示例#1
0
 public ActionResult Create(Can_MealRecordModel model)
 {
     var service = new RestServiceClient<Can_MealRecordModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Can_Service);
     var result = service.Post(_hrm_Can_Service, "api/Can_MealRecord/", model);
     return View();
 }
示例#2
0
 /// <summary>
 /// [Hieu.Van] - Lấy dữ liệu theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Can_MealRecordModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Can_MealRecordModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Can_MealRecordEntity>(id, ConstantSql.hrm_can_get_MealRecordById ,ref status);
     if (entity != null)
     {
         model = entity.CopyData<Can_MealRecordModel>();
     }
     model.ActionStatus = status;
     return model;
 }