combo+sql+C#
-
the Pronblem is i have a table of employeeinfo having attribuyes EmpID EmpName EmpFatherName GenID now GenID is a primary key of a separate table having two attributes that is GenID Gender the problem is when the form runs displaying 3 textboxes and one combobox the user must select the entry from gender and click save the values must be stored in the table of sql that is Employeeinfo i saved the first three attributes by the following code datarow.["EmpID"] = EmpID.text; but on GenID it gives problem bcoz i want to relate the Gender attribute to the GenID Attribute in the EmployeeInfo table and must be saved in the sql data table SAS
-
the Pronblem is i have a table of employeeinfo having attribuyes EmpID EmpName EmpFatherName GenID now GenID is a primary key of a separate table having two attributes that is GenID Gender the problem is when the form runs displaying 3 textboxes and one combobox the user must select the entry from gender and click save the values must be stored in the table of sql that is Employeeinfo i saved the first three attributes by the following code datarow.["EmpID"] = EmpID.text; but on GenID it gives problem bcoz i want to relate the Gender attribute to the GenID Attribute in the EmployeeInfo table and must be saved in the sql data table SAS
Make the combo boxe's Display Member property to Gender and Value Member property to GenID. when assigning the values to employeeinfo use like this datarow.["EmpID"] = EmpID.text; . . . datarow.["GenID"] = comboBox.SelectedValue; Regards