Ejemplo n.º 1
0
 private void btnLuuThongTin_Click(object sender, EventArgs e)
 {
     try
     {
         LICHSUTUVAN _lstuvan = new LICHSUTUVAN()
         {
             HocVienId    = this.HocVienId_Select,
             NguoiTuVan   = txtNguoiTuVan.Text,
             NoiDungTuVan = txtNoiDungTuVan.Text,
             KetQuaTuVan  = txtKetQuaTuVan.Text,
             GhiChu       = txtGhiChu.Text,
             NgayTuVan    = dateNgayTuVan.DateTime,
         };
         if (LichSuTuVanLogic.Insert(_lstuvan))
         {
             O2S_Common.Utilities.ThongBao.frmThongBao frmthongbao = new O2S_Common.Utilities.ThongBao.frmThongBao(Base.ThongBaoLable.THEM_MOI_THANH_CONG);
             frmthongbao.Show();
         }
         else
         {
             O2S_Common.Utilities.ThongBao.frmThongBao frmthongbao = new O2S_Common.Utilities.ThongBao.frmThongBao(Base.ThongBaoLable.THEM_MOI_THAT_BAI);
             frmthongbao.Show();
         }
     }
     catch (Exception ex)
     {
         O2S_Common.Logging.LogSystem.Error(ex);
     }
 }
Ejemplo n.º 2
0
 private void LoadLichSuTuVanTheoHocVien(int _HocVienId)
 {
     try
     {
         List <LichSuTuVan_PlusDTO> _lstLSTuVan = LichSuTuVanLogic.Select(_HocVienId);
         if (_lstLSTuVan != null && lstHocVien.Count > 0)
         {
             for (int i = 0; i < _lstLSTuVan.Count; i++)
             {
                 _lstLSTuVan[i].Stt = i + 1;
             }
             gridControlLSTuVan.DataSource = _lstLSTuVan;
         }
         else
         {
             gridControlLSTuVan.DataSource = null;
         }
     }
     catch (Exception ex)
     {
         O2S_Common.Logging.LogSystem.Warn(ex);
     }
 }