private string ValidateHeaderControlles() { string ValidateMessage = string.Empty; if (DataGridDetails.Rows.Count <= 0) { return("Please add atleast one product to purchase"); } if (DropDownSupplierName.SelectedIndex <= 0) { DropDownSupplierName.Focus(); return("Please select the Supplier Name"); } if (DropDownSupplierMobNo.SelectedIndex <= 0) { DropDownSupplierMobNo.Focus(); return("Please select the Supplier Mobile Number"); } if (DropDownPaymentType.SelectedIndex <= 0) { DropDownPaymentType.Focus(); return("Please select the Payment Type."); } if (string.IsNullOrEmpty(TxtPaidAmount.Text.ToString())) { TxtPaidAmount.Focus(); return("Please enter the Paid Amount"); } return(ValidateMessage); }
public void GetSupplierNameList() { try { DtItemList.Clear(); DcItemList.Clear(); DropDownSupplierName.Refresh(); DtItemList = CmC.GetMasterNamesAndCodes("", 0, 6); if (DtItemList.Rows.Count > 0) { DropDownSupplierName.DataSource = new BindingSource(CmC.ConvertDataTableToDictionary(DtItemList), null); DropDownSupplierName.DisplayMember = "Value"; DropDownSupplierName.ValueMember = "Key"; } } catch (Exception _exception) { CmC.InsertException(_exception); messageShow.singlemsgtext(CmC.ExceptionErrorMessage); } }