public void PopulateCombos() { try { DdlEmpId.DataSource = objEmp.ShowEmp(); DdlEmpId.DataTextField = "Emp_FirstName"; DdlEmpId.DataValueField = "EmpId"; DdlEmpId.DataBind(); DdlEmpId.Items.Insert(0, "Select"); DdlVisaTypeId.DataSource = objVisaType.ShowVisaType(); DdlVisaTypeId.DataTextField = "VisaTypeName"; DdlVisaTypeId.DataValueField = "VisaTypeId"; DdlVisaTypeId.DataBind(); DdlVisaTypeId.Items.Insert(0, "Select"); DdlPasportId.DataSource = objPassport.ShowEmployeePassport(); DdlPasportId.DataTextField = "PassportId"; DdlPasportId.DataValueField = "PassportId"; DdlPasportId.DataBind(); DdlPasportId.Items.Insert(0, "Select"); } catch (Exception ex) { lblMsg.Text = ex.Message; } }
public void PopulateCombo() { try { DdlEmpId.DataSource = objEmp.ShowEmp(); DdlEmpId.DataTextField = "Emp_FirstName"; DdlEmpId.DataValueField = "EmpId"; DdlEmpId.DataBind(); DdlEmpId.Items.Insert(0, "Select"); } catch (Exception ex) { lblMsg.Text = ex.Message; } }
public void PopulateCombos() { try { DdlEmpId.DataSource = objPassport.ShowEmployeeTravel(); DdlEmpId.DataTextField = "EmployeeId"; DdlEmpId.DataValueField = "EmployeeId"; DdlEmpId.DataBind(); DdlEmpId.Items.Insert(0, "Select"); DdlEmpTravelId.DataSource = objPassport.ShowEmployeeTravel(); DdlEmpTravelId.DataTextField = "EmployeeTravelId"; DdlEmpTravelId.DataValueField = "EmployeeTravelId"; DdlEmpTravelId.DataBind(); DdlEmpTravelId.Items.Insert(0, "Select"); } catch (Exception ex) { lblMsg.Text = ex.Message; } }