Example #1
0
 /// <summary>
 /// [Tho.Bui] - Lấy dữ liệu Quốc Gia(Cat_Country) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Sal_BasicSalaryModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Sal_BasicSalaryModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Sal_BasicSalaryEntity>(id, ConstantSql.hrm_Sal_sp_get_BasicSalaryById, ref status);//note
     if (entity != null)
     {
         model = entity.CopyData<Sal_BasicSalaryModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Example #2
0
 /// <summary>
 /// Xử lí thay doi trang thai 
 /// </summary>
 /// <param name="contract"></param>
 /// <returns></returns>    
 /// 
 public ActionResult SetStatusSelected(List<Guid> selectedIds, string status, string userApproved)
 {
     var model = new Sal_BasicSalaryModel();
     if (selectedIds != null)
     {
         var service = new RestServiceClient<Sal_BasicSalaryModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         model.IDs = String.Join(",", selectedIds);
         model.Status = status;
         //Guid Approved = Guid.Empty;
         //Guid.TryParse(userApproved, out Approved);
         //if (Approved == Guid.Empty)
         //{
         //    model.ActionStatus = "NoPermission";
         //    return Json(model);
         //}
         model = service.Put(_hrm_Hr_Service, "api/Sal_BasicSalary/", model);
     }
     return Json(model);
 }