Exemple #1
0
        protected override void print()
        {
            r_dsnhanvien xtraDsnhanvien = new r_dsnhanvien();

            Biencucbo.thoigian        = cbothoigian.Text;
            xtraDsnhanvien.DataSource = db.LayDanhSachNhanSu(tungay, denngay);
            xtraDsnhanvien.ShowPreviewDialog();
        }
Exemple #2
0
 private void laydsd()
 {
     tungay  = cbothoigian.DateTime;
     denngay = new DateTime(cbothoigian.DateTime.Year, cbothoigian.DateTime.Month, DateTime.DaysInMonth(cbothoigian.DateTime.Year, cbothoigian.DateTime.Month));
     db      = new KetNoiDBDataContext();
     try
     {
         gd.DataSource  = db.LayDanhSachNhanSu(tungay, denngay);
         gd1.DataSource = gd.DataSource;
         gv.ClearGrouping();
         gv.Columns["noicongtac"].GroupIndex = 1;
         gv.Columns["phong"].GroupIndex      = 2;
         gv.ExpandAllGroups();
         gv.BestFitColumns();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }