Ejemplo n.º 1
0
 public Eva_BonusSalaryModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Eva_BonusSalaryModel();
     var service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Eva_BonusSalaryEntity>(id, ConstantSql.hrm_eva_sp_get_BonusSalary, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Eva_BonusSalaryModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Ejemplo n.º 2
0
        public ActionResult Create(Eva_BonusSalaryModel model)
        {
            //var isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Eva_BonusSalary);
            //if (!isAccess)
            //{
            //    return PartialView(ConstantMessages.AccessDenied);
            //}

            var service = new RestServiceClient<Eva_BonusSalaryModel>(UserLogin);
            service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
            var result = service.Post(_hrm_Hr_Service, "api/Eva_BonusSalary/", model);
            ViewBag.MsgInsert = "Insert success";
            return Json(result, JsonRequestBehavior.AllowGet);
        }