/// <summary> /// [Tam.Le] - Xóa hoặc chuyển đổi trạng thái của MachineOfLine sang IsDelete /// </summary> /// <param name="id"></param> /// <returns></returns> public Can_MachineOfLineModel DeleteOrRemove(Guid id) { var service = new Can_MachineOfLineServices(); var isSuccess = service.Delete <Can_MachineOfLineEntity>(id); var result = new Can_MachineOfLineModel(); return(result); }
public ActionResult Create(Can_MachineOfLineModel model) { if (ModelState.IsValid) { var service = new RestServiceClient <Can_MachineOfLineModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Can_Service); var result = service.Put(_hrm_Can_Service, "api/Can_MachineOfLine/", model); //ViewBag.MsgInsert = ConstantDisplay.HRM_Canteen_Location_InsertSuccess.TranslateString(); } return(View()); }
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Can_MachineOfLineModel Can_MachineOfLine) { if (ModelState.IsValid) { var service = new RestServiceClient <Can_MachineOfLineModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Can_Service); var result = service.Put(_hrm_Can_Service, "api/Can_MachineOfLine/", Can_MachineOfLine); //return Json(result); //ViewBag.MsgUpdate = ConstantDisplay.HRM_Canteen_Location_UpdateSuccess.TranslateString(); } return(View()); }
/// <summary> /// [Tam.Le] - Lấy dữ liệu MachineOfLine theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Can_MachineOfLineModel GetById(Guid id) { string status = string.Empty; var model = new Can_MachineOfLineModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetData <Can_MachineOfLineEntity>(id, ConstantSql.hrm_can_sp_get_machineoflinebyid, ref status).FirstOrDefault(); if (entity != null) { model = entity.CopyData <Can_MachineOfLineModel>(); } model.ActionStatus = status; return(model); }
public Can_MachineOfLineModel Post([Bind] Can_MachineOfLineModel model) { ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Can_MachineOfLineEntity, Can_MachineOfLineModel>(model)); }