//protected void btnSave_Click(object sender, DirectEventArgs e) //{ // List<string> lists = new List<string>(); // string[] nhanxet = hdfNhanXet.Text.Split('#'); // for (int i = nhanxet.Count() - 1; i >= 0; i--) // { // if (nhanxet[i].Trim() != "") // { // string[] tmp = nhanxet[i].Split('$'); // if (!lists.Contains(tmp[0].Trim())) // { // new KetQuaDanhGiaController().UpdateNhanXetByID(int.Parse("0" + tmp[0]), tmp[1]); // lists.Add(tmp[0].Trim()); // } // } // } // hdfNhanXet.Text = ""; // grp_TieuChiDanhGia.Reload(); // grp_CanBoBiDanhGia.Reload(); //} protected void HandleChanges(object sender, BeforeStoreChangedEventArgs e) { ChangeRecords <TienHanhDanhGia> canbos = e.DataHandler.ObjectData <TienHanhDanhGia>(); foreach (TienHanhDanhGia updated in canbos.Updated) { DAL.TieuChi_DotDanhGia tc = new TieuChi_DotDanhGiaController().GetByMaDotDanhGiavaMaTieuChi(hdfMaDotDanhGia.Text, updated.MaNhom); KetQuaDanhGiaInfo kqua = new KetQuaDanhGiaInfo() { ID = updated.ID, CreatedBy = CurrentUser.ID, CreatedDate = DateTime.Now, Diem = (float)Math.Round(updated.Diem, 2), IdTieuChi_DotDanhGia = tc.ID, MaCB = hdfMaCanBo.Text, NhanXet = updated.NhanXet }; if (isNguoiQL == true) { kqua.IsQuanLyDanhGia = true; } // update kết quả new KetQuaDanhGiaController().Update(kqua); } e.Cancel = true; Dialog.ShowNotification("Đã lưu kết quả đánh giá"); // cập nhật kết quả hàng tháng try { DataController.DataHandler.GetInstance().ExecuteNonQuery("DanhGia_UpdateDanhGiaTheoThang", "@MaCanBo", "@MaDotDanhGia", hdfMaCanBo.Text, hdfMaDotDanhGia.Text); } catch (Exception ex) { } }
public void Update(KetQuaDanhGiaInfo record) { DataController.DataHandler.GetInstance().ExecuteNonQuery("UpdateKetQuaDanhGia", "@ID", "@MaCB", "@Diem", "@IdTieuChi_DotDanhGia", "@NhanXet", "@CreatedDate", "@CreatedBy", "@IsQuanLyDanhGia", record.ID, record.MaCB, record.Diem, record.IdTieuChi_DotDanhGia, record.NhanXet, record.CreatedDate, record.CreatedBy, record.IsQuanLyDanhGia); }