コード例 #1
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Att_RosterGroupModel AttRosterGroup)
 {
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Att_RosterGroupModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
         var result = service.Put(_Hrm_Hre_Service, "api/Att_RosterGroup/", AttRosterGroup);
         ViewBag.MsgUpdate = ConstantDisplay.HRM_Attendance_RosterGroup_UpdateSuccess.TranslateString();
     }
     return View();
 }
コード例 #2
0
        public ActionResult Create(Att_RosterGroupModel model)
        {

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Att_RosterGroupModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
                var result = service.Put(_Hrm_Hre_Service, "api/Att_RosterGroup/", model);
                ViewBag.MsgInsert = ConstantDisplay.HRM_Attendance_RosterGroup_InsertSuccess.TranslateString();
            }
            return View();
        }
コード例 #3
0
 /// <summary>
 /// [Hieu.van - Lấy dữ liệu RosterGroup
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Att_RosterGroupModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Att_RosterGroupModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Att_RosterGroupEntity>(id, ConstantSql.hrm_att_sp_get_RosterGroupById, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Att_RosterGroupModel>();
     }
     model.ActionStatus = status;
     return model;
 }
コード例 #4
0
 /// <summary>
 /// Xử lí thay doi trang thai cua roster group 
 /// </summary>
 /// <param name="contract"></param>
 /// <returns></returns>      
 public ActionResult SetStatusSelected(List<Guid> selectedIds, string status)
 {
     var rosterGroup = new Att_RosterGroupModel();
     if (selectedIds != null || selectedIds.Count > 0)
     {
         var service = new RestServiceClient<Att_RosterGroupModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
         rosterGroup.ProfileIds = Common.DotNetToOracle(String.Join(",", selectedIds));
         rosterGroup.Status = status;
         service.Put(_Hrm_Hre_Service, "api/Att_RosterGroup/", rosterGroup);
     }
     return Json("");
 }