public ActionResult Create(Cat_SkillModel model) { if (ModelState.IsValid) { var service = new RestServiceClient<Cat_SkillModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Hr_Service); var result = service.Put(_hrm_Hr_Service, "api/Cat_Skill/", model); ViewBag.MsgInsert = ConstantDisplay.HRM_Attendance_Overtime_CreateSuccess.TranslateString(); } return View(); }
/// <summary> /// </summary> /// <param name="id"></param> /// <returns></returns> public Cat_SkillModel GetById(Guid id) { string status = string.Empty; var model = new Cat_SkillModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore<Cat_SkillEntity>(id, ConstantSql.hrm_cat_sp_get_SkillById, ref status); if (entity!=null) { model = entity.CopyData<Cat_SkillModel>(); } model.ActionStatus = status; return model; }