public async Task <ActionResult> DeleteChecklistWorkInstruction(OapChecklistWorkInstruction model)
 {
     if (model.Id > 0)
     {
         var response = await GetClient <OapChecklistWorkInstructionClient>().DeleteChecklistWorkInstructionAsync(model.Id);
     }
     return(RedirectToAction("Index"));
 }
        public WebApiResult <bool> UpdateChecklistWorkInstruction([FromBody] OapChecklistWorkInstruction list)
        {
            if (list == null)
            {
                throw new System.Exception("Argument is null");
            }

            return(TryCatch <UpdateChecklistWorkInstructionRequest, bool>(new UpdateChecklistWorkInstructionRequest(list)));
        }
        public ActionResult UpdateChecklistWorkInstruction(OapChecklistWorkInstruction model)
        {
            var response = GetClient <OapChecklistWorkInstructionClient>().UpdateChecklistWorkInstructionAsync(model).Result;

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> CreateChecklistWorkInstruction(OapChecklistWorkInstruction model)
        {
            var response = await GetClient <OapChecklistWorkInstructionClient>().AddChecklistWorkInstructionAsync(model);

            return(RedirectToAction("Index"));
        }
示例#5
0
 public UpdateChecklistWorkInstructionRequest(OapChecklistWorkInstruction checklistWorkInstruction)
 {
     ChecklistWorkInstruction = checklistWorkInstruction;
 }
 public WebApiResult <OapChecklistWorkInstruction> AddChecklistWorkInstruction([FromBody] OapChecklistWorkInstruction list)
 {
     return(TryCatch <AddChecklistWorkInstructionRequest, OapChecklistWorkInstruction>(new AddChecklistWorkInstructionRequest(list)));
 }