Ejemplo n.º 1
0
 private void ngayqd_Validated(object sender, System.EventArgs e)
 {
     if (ngayqd.Text == "")
     {
         return;
     }
     ngayqd.Text = ngayqd.Text.Trim();
     if (!ttb.bNgay(ngayqd.Text))
     {
         MessageBox.Show("Ngày không hợp lệ !", ttb.Msg);
         ngayqd.Focus();
         return;
     }
     ngayqd.Text = ttb.Ktngaygio(ngayqd.Text, 10);
 }
Ejemplo n.º 2
0
 private void ngay_Validated(object sender, EventArgs e)
 {
     if (ngay.Text == "")
     {
         return;
     }
     ngay.Text = ngay.Text.Trim();
     if (ngay.Text.Length == 6)
     {
         ngay.Text = ngay.Text + DateTime.Now.Year.ToString();
     }
     if (!ttb.bNgay(ngay.Text))
     {
         MessageBox.Show("Ngày không hợp lệ !", ttb.Msg);
         ngay.Focus();
         return;
     }
     ngay.Text = ttb.Ktngaygio(ngay.Text, 10);
 }