Example #1
0
 public ActionResult Create(Cat_SyncModel model)
 {
     var service = new RestServiceClient<Cat_SyncModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Post(_hrm_Hr_Service, "api/Cat_Sync/", model);
     return Json(result, JsonRequestBehavior.AllowGet);
 }
Example #2
0
 /// <summary>
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Cat_SyncModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Cat_SyncModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Cat_SyncEntity>(id, ConstantSql.hrm_cat_sp_get_SyncById, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Cat_SyncModel>();
     }
     model.ActionStatus = status;
     return model;
 }