private void refresh()
 {
     NameTextBox.Clear();
     GenderComboBox.SelectedIndex = 0;
     DOBTextBox.Clear();
     QATextBox.Clear();
     DOHTextBox.Clear();
     typeComboBox.SelectedIndex = 0;
     AdressTextBox.Clear();
     passwordTextBox.Clear();
     confrimPWTextBox.Clear();
     PayTextBox.Clear();
     bindingDateGridView(null);
 }
Exemple #2
0
        private void Input()
        {
            if (CusNameTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Please Enter Customer Name");
                CusNameTextBox.Focus();
                return;
            }
            else
            {
                customerIndex = CusNameTextBox.Text;
            }

            if (ContactTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Please Enter Contact No.");
                ContactTextBox.Focus();
                return;
            }
            else
            {
                contacts = Convert.ToInt32(ContactTextBox.Text);
            }
            if (AdressTextBox.Text.Trim() == "")
            {
                MessageBox.Show("Please Enter Your Address");
                AdressTextBox.Focus();
                return;
            }
            else
            {
                addressIndex = AdressTextBox.Text;
            }
            if (PriceComboBox.Text.Trim() == "")
            {
                MessageBox.Show("Please Enter Your Info");
                PriceComboBox.Focus();
                return;
            }
            else
            {
                priceIndex = PriceComboBox.Text;
            }

            if (String.IsNullOrEmpty(OrderComboBox.Text) || String.IsNullOrEmpty(QuantityNumericUpDown.Text))
            {
                MessageBox.Show("Order Item and Order Quantity Field Required");
            }
        }