예제 #1
0
 private void my_date_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (!GF.isValidDate(my_date.Text))
         {
             MessageBox.Show("INVALID DATE FORMAT !!\r\nPLEASE CHECK !!", "ERROR");
             e.Handled = true;
         }
     }
 }
예제 #2
0
 private void my_date_TypeValidationCompleted(object sender, TypeValidationEventArgs e)
 {
     if (!GF.emptyDate(Text.Trim()))
     {
         if (!e.IsValidInput || Text.Trim().Length != 10 || !GF.isValidDate(Text.Trim()))
         {
             MessageBox.Show("INVALID DATE !! PLEASE CHECK THE DATE AGAIN !!\r\n\r\n HINT : DATE MUST BE ONLY IN FORMAT DD/MM/YYYY !!", "ERROR");
             my_date.Select();
             GF.closeLoading();
             return;
         }
     }
 }