private void User_Right_Insert() { try { if (c_change) { User_RightsController _User_RightsController = new User_RightsController(); ArrayList arrRight = new ArrayList(); foreach (User_FunctionsInfo item in c_arrFunction) { if (item.right != "000000") { User_RightsInfo _User_RightsInfo = ConvertToUser_RightsInfo(item, c_UsersInfo.User_Id); arrRight.Add(_User_RightsInfo); } } if (arrRight.Count > 0) { MessageBoxResult result1 = NoteBox.Show("Bạn có muốn sửa thông tin này hay không?", "Thông báo", NoteBoxLevel.Question); if (result1 == MessageBoxResult.Yes) { _User_RightsController.User_Rights_DelByUser(c_UsersInfo.User_Name); _User_RightsController.User_Rights_Insert_Barth(arrRight, c_UsersInfo.User_Name); User_Controller _usC0n = new User_Controller(); _usC0n.User_Change_SetRight(c_UsersInfo.User_Id); NoteBox.Show("Cập nhật dữ liệu thành công"); this.Close(); } } else { NoteBox.Show("Bạn chưa đặt quyền cho chức năng nào", "Thông báo", NoteBoxLevel.Error); } } else { NoteBox.Show("Bạn chưa thực hiện thay đổi quyền nào", "Thông báo", NoteBoxLevel.Error); } } catch (Exception ex) { CommonData.log.Error(ex.ToString()); NoteBox.Show("Cập nhật dữ liệu không thành công", "Lỗi", NoteBoxLevel.Error); } }