Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public ActionResult Add()
        {
            WorkflowAddViewModel model = new WorkflowAddViewModel();

            return(View("Add", model));
        }
Ejemplo n.º 3
0
 public async Task <JsonResult> checkWorkflowIfExist(WorkflowAddViewModel data)
 {
     return(await checkWorkflow(data.comp_id, data.wflw_id)
         ? Json(true, JsonRequestBehavior.AllowGet)
         : Json(false, JsonRequestBehavior.AllowGet));
 }