Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        private void InitDropDownUnit()
        {
            DataTable table = GetEntityListTable("Unit");

            DropDownUnit.DataSource     = table;
            DropDownUnit.DataTextField  = "Name";
            DropDownUnit.DataValueField = "ID";
            DropDownUnit.DataBind();

            DropDownUnit.Items.Insert(0, new FineUIPro.ListItem("", "-1"));
            DropDownUnit.Items[0].Selected = true;
        }