Пример #1
0
 private void MRPTextBox_Leave(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(MRPTextBox.Text))
     {
         MRPErrorLabel.ResetText();
     }
 }
Пример #2
0
        private bool IsValid()
        {
            if (String.IsNullOrEmpty(invoiceNoTextBox.Text))
            {
                invoiceNoErrorLabel.Text = "Please Enter Invoice/Bill No";
                return(false);
            }
            else
            {
                invoiceNoErrorLabel.ResetText();
            }


            if (Convert.ToInt32(supplierComboBox.SelectedValue) == 0)
            {
                supplierErrorLabel.Text = "Please Select Supplier";
                return(false);
            }
            else
            {
                supplierErrorLabel.ResetText();
            }

            if (Convert.ToInt32(categoryComboBox.SelectedValue) == 0)
            {
                categoryErrorLabel.Text = "Please Select Category";
                return(false);
            }
            else
            {
                supplierErrorLabel.ResetText();
            }

            if (Convert.ToInt32(productComboBox.SelectedValue) == 0)
            {
                productErrorLabel.Text = "Please Select Product";
                return(false);
            }
            else
            {
                productErrorLabel.ResetText();
            }

            if (String.IsNullOrEmpty(quantityTextBox.Text))
            {
                quantityErrorLabel.Text = "Please Enter Quantity";
                return(false);
            }
            else
            {
                quantityErrorLabel.ResetText();
            }

            if (String.IsNullOrEmpty(unitPriceTextBox.Text))
            {
                unitPriceErrorLabel.Text = "Please Enter Unit Price";
                return(false);
            }
            else
            {
                unitPriceErrorLabel.ResetText();
            }

            if (String.IsNullOrEmpty(MRPTextBox.Text))
            {
                MRPErrorLabel.Text = "Please Enter M.R.P (Tk.)";
                return(false);
            }
            else
            {
                MRPErrorLabel.ResetText();
            }


            return(true);
        }