Esempio n. 1
0
 public void GetColorList(int BrandCode, int ColorCode, string BrandName, int OperationType)
 {
     try
     {
         DtBrandList.Clear();
         DcItemList.Clear();
         DropDownColorName.Refresh();
         DtBrandList = CmC.GetStockReport(BrandCode, ColorCode, BrandName, OperationType);
         if (DtBrandList.Rows.Count > 0)
         {
             DcItemList.Add("0", CmC.FirstElementInSelect);
             foreach (DataRow DtCol in DtBrandList.Rows)
             {
                 DcItemList.Add(DtCol[0].ToString(), DtCol[1].ToString());
             }
             DropDownColorName.DataSource    = new BindingSource(DcItemList, null);
             DropDownColorName.DisplayMember = "Value";
             DropDownColorName.ValueMember   = "Key";
         }
     }
     catch (Exception _exception)
     {
         CmC.InsertException(_exception);
         messageShow.singlemsgtext(CmC.ExceptionErrorMessage);
     }
 }
Esempio n. 2
0
        private string ValidateLineControlles()
        {
            string ValidateMessage = string.Empty;

            if (DropDownItemName.SelectedIndex <= 0)
            {
                DropDownItemName.Focus();
                return("Please select the Item Name.");
            }
            if (DropDownProductName.SelectedIndex <= 0)
            {
                DropDownProductName.Focus();
                return("Please select the Product Name.");
            }
            if (DropDownBrandName.SelectedIndex <= 0)
            {
                DropDownBrandName.Focus();
                return("Please select the Brand Name.");
            }
            if (DropDownColorName.SelectedIndex <= 0)
            {
                DropDownColorName.Focus();
                return("Please select the Color");
            }
            if (string.IsNullOrEmpty(TxtNoItems.Text.ToString()))
            {
                TxtNoItems.Focus();
                return("Please enter the number of Items");
            }
            if (DropDownUnit.SelectedIndex <= 0)
            {
                DropDownUnit.Focus();
                return("Please select the Unit.");
            }
            if (string.IsNullOrEmpty(TxtPurchasePrice.Text.ToString()))
            {
                TxtPurchasePrice.Focus();
                return("Please enter the purchase price");
            }
            if (string.IsNullOrEmpty(TxtSalesPrice.Text.ToString()))
            {
                TxtSalesPrice.Focus();
                return("Please enter the sales price");
            }
            if (string.IsNullOrEmpty(TxtCgstPer.Text.ToString()))
            {
                TxtCgstPer.Focus();
                return("Please enter the Cgst percentage");
            }
            if (string.IsNullOrEmpty(TxtSgstPer.Text.ToString()))
            {
                TxtSgstPer.Focus();
                return("Please enter the Sgst percentage");
            }
            return(ValidateMessage);
        }
Esempio n. 3
0
        private string ValidateLineControlles()
        {
            string ValidateMessage = string.Empty;

            if (DropDownItemName.SelectedIndex <= 0)
            {
                DropDownItemName.Focus();
                return("Please select the Item Name.");
            }
            if (DropDownProductName.SelectedIndex <= 0)
            {
                DropDownProductName.Focus();
                return("Please select the Product Name.");
            }
            if (DropDownBrandName.SelectedIndex <= 0)
            {
                DropDownBrandName.Focus();
                return("Please select the Brand Name.");
            }
            if (DropDownColorName.SelectedIndex <= 0)
            {
                DropDownColorName.Focus();
                return("Please select the Color");
            }
            if (string.IsNullOrEmpty(TxtNoOfItems.Text.ToString()))
            {
                TxtNoOfItems.Focus();
                return("Please enter the number of Items");
            }
            if (string.IsNullOrEmpty(TxtDiscountHeader.Text.ToString()))
            {
                TxtDiscountHeader.Focus();
                return("Please enter the discount price");
            }
            return(ValidateMessage);
        }