/// <summary> /// Load data for all drop down lists. /// </summary> private void BindDropDownListsData() { ListItem item = new ListItem(" --- Select ----", "-1"); // Bind Companies Companies objCompany = new Companies(); objCompany.LoadAll(); ui_drpCompanies.DataSource = objCompany.DefaultView; ui_drpCompanies.DataTextField = Companies.ColumnNames.CompNameEng; ui_drpCompanies.DataValueField = Companies.ColumnNames.CompanyID; ui_drpCompanies.DataBind(); ui_drpCompanies.Items.Insert(0, item); // Bind Manufactures. ui_drpManufactures.DataSource = objCompany.DefaultView; ui_drpManufactures.DataTextField = Companies.ColumnNames.CompNameEng; ui_drpManufactures.DataValueField = Companies.ColumnNames.CompanyID; ui_drpManufactures.DataBind(); ui_drpManufactures.Items.Insert(0, item); // Bind Dosage Forms Dosage_form objDosageForm = new Dosage_form(); objDosageForm.LoadAll(); ui_drpDosageForm.DataSource = objDosageForm.DefaultView; ui_drpDosageForm.DataTextField = Dosage_form.ColumnNames.Dosage_form; ui_drpDosageForm.DataValueField = Dosage_form.ColumnNames.DosageFormID; ui_drpDosageForm.DataBind(); ui_drpDosageForm.Items.Insert(0, item); // Bind Registeration_Committee_Type Registeration_Committee_Type objCommitteType = new Registeration_Committee_Type(); objCommitteType.LoadAll(); ui_drpCommitteType.DataSource = objCommitteType.DefaultView; ui_drpCommitteType.DataTextField = Registeration_Committee_Type.ColumnNames.CommitteType; ui_drpCommitteType.DataValueField = Registeration_Committee_Type.ColumnNames.ID; ui_drpCommitteType.DataBind(); ui_drpCommitteType.Items.Insert(0, item); // Bind File Types FileType objFileTypes = new FileType(); objFileTypes.LoadAll(); ui_drpFileType.DataSource = objFileTypes.DefaultView; ui_drpFileType.DataTextField = FileType.ColumnNames.FileType; ui_drpFileType.DataValueField = FileType.ColumnNames.FileTypeID; ui_drpFileType.DataBind(); //ui_drpFileType.Items.Insert(0, item); }
/// <summary> /// Load data for all drop down lists. /// </summary> private void BindDropDownListsData() { ListItem item = new ListItem(" --- Select ----", "-1"); // Bind Companies Companies objCompany = new Companies(); objCompany.LoadAll(); ui_drpCompanies.DataSource = objCompany.DefaultView; ui_drpCompanies.DataTextField = Companies.ColumnNames.CompNameEng; ui_drpCompanies.DataValueField = Companies.ColumnNames.CompanyID; ui_drpCompanies.DataBind(); ui_drpCompanies.Items.Insert(0, item); // Bind Manufactures. ui_drpManufactures.DataSource = objCompany.DefaultView; ui_drpManufactures.DataTextField = Companies.ColumnNames.CompNameEng; ui_drpManufactures.DataValueField = Companies.ColumnNames.CompanyID; ui_drpManufactures.DataBind(); ui_drpManufactures.Items.Insert(0, item); // Bind Dosage Forms Dosage_form objDosageForm = new Dosage_form(); objDosageForm.LoadAll(); ui_drpDosageForm.DataSource = objDosageForm.DefaultView; ui_drpDosageForm.DataTextField = Dosage_form.ColumnNames.Dosage_form; ui_drpDosageForm.DataValueField = Dosage_form.ColumnNames.DosageFormID; ui_drpDosageForm.DataBind(); ui_drpDosageForm.Items.Insert(0, item); // Bind Registeration_Committee_Type Registeration_Committee_Type objCommitteType = new Registeration_Committee_Type(); objCommitteType.LoadAll(); ui_drpCommitteType.DataSource = objCommitteType.DefaultView; ui_drpCommitteType.DataTextField = Registeration_Committee_Type.ColumnNames.CommitteType; ui_drpCommitteType.DataValueField = Registeration_Committee_Type.ColumnNames.ID; ui_drpCommitteType.DataBind(); ui_drpCommitteType.Items.Insert(0, item); uiDropDownListCommitterType_Before.DataSource = objCommitteType.DefaultView; uiDropDownListCommitterType_Before.DataTextField = Registeration_Committee_Type.ColumnNames.CommitteType; uiDropDownListCommitterType_Before.DataValueField = Registeration_Committee_Type.ColumnNames.ID; uiDropDownListCommitterType_Before.DataBind(); uiDropDownListCommitterType_Before.Items.Insert(0, item); //License Type TradePricingLicenseType licenseTypes = new TradePricingLicenseType(); licenseTypes.LoadAll(); uiDropDownListLicenseType.DataSource = licenseTypes.DefaultView; uiDropDownListLicenseType.DataTextField = TradePricingLicenseType.ColumnNames.Name; uiDropDownListLicenseType.DataValueField = TradePricingLicenseType.ColumnNames.TradePricingLicenseTypeID; uiDropDownListLicenseType.DataBind(); uiDropDownListLicenseType.Items.Insert(0, item); //status Type TradePricingStatus statusTypes = new TradePricingStatus(); statusTypes.LoadAll(); uiDropDownListStatusType.DataSource = statusTypes.DefaultView; uiDropDownListStatusType.DataTextField = TradePricingStatus.ColumnNames.Name; uiDropDownListStatusType.DataValueField = TradePricingStatus.ColumnNames.TradePricingStatusID; uiDropDownListStatusType.DataBind(); uiDropDownListStatusType.Items.Insert(0, item); //sector Type SectorType sectorTypes = new SectorType(); sectorTypes.LoadAll(); uiDropDownListSectorType.DataSource = sectorTypes.DefaultView; uiDropDownListSectorType.DataTextField = SectorType.ColumnNames.Name; uiDropDownListSectorType.DataValueField = SectorType.ColumnNames.SectorTypeID; uiDropDownListSectorType.DataBind(); uiDropDownListSectorType.Items.Insert(0, item); // Bind File Types FileType objFileTypes = new FileType(); objFileTypes.LoadAll(); ui_drpFileType.DataSource = objFileTypes.DefaultView; ui_drpFileType.DataTextField = FileType.ColumnNames.FileType; ui_drpFileType.DataValueField = FileType.ColumnNames.FileTypeID; ui_drpFileType.DataBind(); //ui_drpFileType.Items.Insert(0, item); }