예제 #1
0
 private void btn_Luu_Lai_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     //try {
     foreach (int id in m_ListUpdate)
     {
         NGUOI_DUNG _nguoidung = new NGUOI_DUNG();
         _nguoidung.ID_Nguoi_Dung  = int.Parse(gridView1.GetRowCellValue(id, "ID_Nguoi_Dung").ToString());
         _nguoidung.Ten_Nguoi_Dung = gridView1.GetRowCellValue(id, "Ten_Nguoi_Dung").ToString();
         string a = gridView1.GetRowCellValue(id, "Loai_ND").ToString();
         if (a == "Quản Trị Hệ Thống")
         {
             _nguoidung.ID_LoaiND = 1;
         }
         if (a == "Quản Lý")
         {
             _nguoidung.ID_LoaiND = 2;
         }
         if (a == "Nhân Viên Thu Ngân")
         {
             _nguoidung.ID_LoaiND = 3;
         }
         if (a == "Nhân Viên Phòng Bếp")
         {
             _nguoidung.ID_LoaiND = 4;
         }
         m_NguoiDungBLL.Sua(_nguoidung);
     }
     Notification.Success("Cập dữ liệu thành công.");
     //}
     //catch(Exception er)
     //{
     //    Notification.Error("Có lỗi xảy ra khi cập nhật dữ liệu: "+ er.Message);
     //}
     LoadDataSource();
 }