private void fillCountries() { this.countryCodeList = commonManager.GetAreaCodeList(); var countryList = (from p in countryCodeList where p.AreaType == (int)MaterType.Country select new DropDownModel { Code = p.AreaCode, Description = p.Description }).ToList(); if (countryList.Count > 0) { foreach (var cntryItem in countryList) { countryCollection.Add(cntryItem.Code.ToString()); } } txtCountry.AutoCompleteMode = AutoCompleteMode.Suggest; txtCountry.AutoCompleteSource = AutoCompleteSource.CustomSource; }
private void frmSupplier_Load(object sender, EventArgs e) { try { if (CommonFunc.Themeselect == "Theme 1") { ThemeChange(); } this.supplierActionButtons.btnSave.Click += new System.EventHandler(btnSave_Click); this.supplierActionButtons.btnCancel.Click += new System.EventHandler(btnCancel_Click); this.supplierActionButtons.btnClear.Click += new EventHandler(btnClear_Click); this.btnSearch.Click += new EventHandler(btnSearch_Click); txtSupplierCode.KeyPress += new KeyPressEventHandler(txtValidateSpecialCharSpace); this.setInitialFormsValidations(); this.areaCodeList = commonManager.GetAreaCodeList(); var countryList = (from p in areaCodeList where p.AreaType == (int)MaterType.Country select new DropDownModel { Code = p.AreaCode, Description = p.Description }).ToList(); masterTypeList = commonManager.GetMasterTypeList(); var paymentModesList = (from m in masterTypeList where m.CodeType == MaterType.VendorPaymentTerms.ToString() select new DropDownModel { Code = m.Code, Description = m.ShortDesc }).ToList(); var shipmentModesList = (from m in masterTypeList where m.CodeType == MaterType.VendorShipmentType.ToString() select new DropDownModel { Code = m.Code, Description = m.ShortDesc }).ToList(); CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboCountry, countryList); CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboPaymentMethods, paymentModesList); CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboShipmentMethod, shipmentModesList); clearForm(); CommonFunc.SetCultureFromResource(this); //code added by roshan for issue id 2835 label3.Text = "Name"; lblVatTinNo.Text = "GSTNo."; lblVatTinDate.Visible = false; lblCstTinNo.Visible = false; lblCstTinDate.Visible = false; lblTinNo.Visible = false; lblServiceTaxNo.Visible = false; dtpVatTinDate.Visible = false; dtpCstTinDate.Visible = false; txtCstTinNo.Visible = false; txtTinNo.Visible = false; txtServiceTaxNo.Visible = false; } catch (System.Exception ex) { Logger.Log(ex, Logger.LogingLevel.Error); //MessageBox.Show(ex.Message); } finally { } }