Esempio n. 1
0
        private void fgThongBao_DoubleClick(object sender, EventArgs e)
        {
            int         ID_CongViec = fgThongBao.GetIntValue(fgThongBao.Row, "ID_CongViec");
            frmCongViec congViec    = new frmCongViec(ID_CongViec, true);

            congViec.ShowDialog();
            clsThongBao thongBao = new clsThongBao();

            thongBao.ID_ThongBao = fgThongBao.GetIntValue(fgThongBao.Row, "ID_ThongBao");
            thongBao.SelectOne();
            thongBao.TrangThai = 2;
            thongBao.Update();
            Load_fgThongBao();
        }
Esempio n. 2
0
        private void btnDaXem_Click(object sender, EventArgs e)
        {
            var         fg  = fgThongBao;
            clsThongBao cls = new clsThongBao();

            for (int i = fg.Rows.Fixed; i < fg.Rows.Count; i++)
            {
                if (fg.GetIntValue(i, "TrangThai") != 2)
                {
                    int ID_ThongBao = fg.GetIntValue(i, "ID_ThongBao");
                    cls.ID_ThongBao = ID_ThongBao;
                    cls.SelectOne();
                    cls.TrangThai = 2;
                    cls.Update();
                }
            }
            Load_fgThongBao();
        }