Exemple #1
0
 private void butHuy_Click(object sender, System.EventArgs e)
 {
     if (dt.Rows.Count > 0)
     {
         if (MessageBox.Show(
                 lan.Change_language_MessageText("Đồng ý hủy ?"), d.Msg, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             d.delrec(dt, "maicd='" + icd_chinh.Text + "'");
             ref_text();
         }
     }
 }
Exemple #2
0
        private void Tao_nhom()
        {
            d.delrec(dtnhomvp, "true");
            DateTime dt1 = d.StringToDate(tu.Text).AddDays(-d.iNgaykiemke);
            DateTime dt2 = d.StringToDate(den.Text).AddDays(d.iNgaykiemke);
            int      y1 = dt1.Year, m1 = dt1.Month;
            int      y2 = dt2.Year, m2 = dt2.Month;
            int      itu, iden;
            string   mmyy = "";

            for (int i = y1; i <= y2; i++)
            {
                itu  = (i == y1)?m1:1;
                iden = (i == y2)?m2:12;
                for (int j = itu; j <= iden; j++)
                {
                    mmyy = j.ToString().PadLeft(2, '0') + i.ToString().Substring(2, 2);
                    if (d.bMmyy(mmyy))
                    {
                        get_nhom(mmyy);
                    }
                }
            }
        }