예제 #1
0
 private void dateTimePicker1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         ProductIdtxt.Focus();
     }
 }
예제 #2
0
        private void ClearControl()
        {
            ProductIdtxt.Clear();
            Productnametxt.Clear();
            comboBoxproduct.SelectedIndex = -1;
            Addprobtn.Text = "Add";

            ProductIdtxt.Focus();
        }
예제 #3
0
 private void ResetRecords()
 {
     // dateTimePicker1.Value = DateTime.Now;
     ProductIdtxt.Clear();
     Productnametxt.Clear();
     Quantitytxt.Clear();
     comboBoxproductstatus.SelectedIndex = -1;
     Addbtn.Text = "Add";
     dateTimePicker1.Focus();
 }
예제 #4
0
 private void ProductIdtxt_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (ProductIdtxt.Text.Length > 0)
         {
             Productnametxt.Focus();
         }
         else
         {
             ProductIdtxt.Focus();
         }
     }
 }
예제 #5
0
        private bool IsValid()

        {
            if (ProductIdtxt.Text.Trim() == string.Empty)
            {
                MessageBox.Show("Inter Product ID", "Form validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                ProductIdtxt.Focus();
                return(false);
            }
            if (Productnametxt.Text.Trim() == string.Empty)
            {
                MessageBox.Show("Inter Product", "Form validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Productnametxt.Focus();
                return(false);
            }
            return(true);
        }