public async Task <ActionResult> Add(WorkflowAddViewModel data) { if (ModelState.IsValid) { try { data.createdBy = Session["user_id"].ToString(); data.createdDateTime = DateTime.Now; var postTask = await client.PostAsJsonAsync("/api/Workflow/Add", data); if (postTask.IsSuccessStatusCode) { return(Json(true, JsonRequestBehavior.DenyGet)); } } catch (Exception e) { return(Json(e.Message, JsonRequestBehavior.DenyGet));; } } return(Json(false, JsonRequestBehavior.DenyGet)); }
public ActionResult Add() { WorkflowAddViewModel model = new WorkflowAddViewModel(); return(View("Add", model)); }
public async Task <JsonResult> checkWorkflowIfExist(WorkflowAddViewModel data) { return(await checkWorkflow(data.comp_id, data.wflw_id) ? Json(true, JsonRequestBehavior.AllowGet) : Json(false, JsonRequestBehavior.AllowGet)); }