Ejemplo n.º 1
0
 private void Clear()
 {
     TxtCustomerName.Clear();
     TxtCustomerSurname.Clear();
     TxtCustomerPhone.Clear();
     TxtCustomerEmail.Clear();
     TxtCustomerIdNumber.Clear();
 }
Ejemplo n.º 2
0
        // TextBox Reset
        private void Reset()
        {
            TxtCustomerName.Clear();
            TxtCustomerPhone.Clear();
            TxtCustomerSurname.Clear();
            DtpBirthday.SelectedDate = null;

            BtnCreate.Visibility = Visibility.Visible;
            BtnUpdate.Visibility = Visibility.Hidden;
            BtnDelete.Visibility = Visibility.Hidden;

            FillCustomers();
        }
Ejemplo n.º 3
0
        // Checking the values that come from textbox
        private bool FormValidation()
        {
            bool hasError = false;

            bool success = int.TryParse(TxtCustomerPhone.Text, out _);

            if (string.IsNullOrEmpty(TxtCustomerName.Text) || string.IsNullOrEmpty(TxtCustomerPhone.Text) || string.IsNullOrEmpty(TxtCustomerSurname.Text) || DtpBirthday.SelectedDate == null)
            {
                MessageBox.Show("Zəhmət olmasa bütün xanaları doldurun");
                hasError = true;
            }
            else if (!success)
            {
                MessageBox.Show("Nömrəni düzgün daxil edin");
                TxtCustomerPhone.Select(0, TxtCustomerPhone.Text.Length);
                TxtCustomerPhone.Focus();
                hasError = true;
            }

            return(hasError);
        }
 private void Reset()
 {
     TxtCustomerName.Clear();
     TxtCustomerPhone.Clear();
     FillCustomer();
 }