public ActionResult UpdateWorkFlow(BlWorkFlow ObjBlWorkFlow)
        {
            long statusCode = 0;

            ObjBlWorkFlow.UserCode   = Convert.ToInt64(Session["ID_Agent"]);
            ObjBlWorkFlow.FK_Company = Convert.ToInt64(Session["ID_Company"]);
            if (ObjBlWorkFlow.MasterID == 0)
            {
                statusCode = ObjBlWorkFlow.InsertData();
            }
            else
            {
                statusCode = ObjBlWorkFlow.UpdateData();
            }

            return(Json(new { statusCode = "" + statusCode + "" }, JsonRequestBehavior.AllowGet));
        }
 public JsonResult FillWorkFlow(Int64 ID_WorkFlow)
 {
     try
     {
         DataTable  dtbl       = new DataTable();
         BlWorkFlow blWorkFlow = new BlWorkFlow();
         blWorkFlow.MasterID   = ID_WorkFlow;
         blWorkFlow.UserCode   = Convert.ToInt64(Session["ID_Agent"]);
         blWorkFlow.FK_Company = Convert.ToInt64(Session["ID_Company"]);
         dtbl = blWorkFlow.SelectAllData();
         return(Json(Converttojson(dtbl), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }
        public JsonResult DeleteWorkFlow(Int64 ID_WorkFlow)
        {
            try
            {
                long       statusCode = 0;
                BlWorkFlow blWorkFlow = new BlWorkFlow();
                blWorkFlow.MasterID   = ID_WorkFlow;
                blWorkFlow.UserCode   = Convert.ToInt64(Session["ID_Agent"]);
                blWorkFlow.FK_Company = Convert.ToInt64(Session["ID_Company"]);

                statusCode = blWorkFlow.DeleteData();
                return(Json(new { statusCode = "" + statusCode + "" }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(ex));
            }
        }
        public JsonResult SelectWorkFlowAll(string PageIndex = "1", string SearchItem = "")
        {
            try
            {
                int        statusCode = 1;
                DataTable  dtbl       = new DataTable();
                BlWorkFlow blWorkFlow = new BlWorkFlow();
                blWorkFlow.PageIndex  = Convert.ToInt32(PageIndex);
                blWorkFlow.FK_Company = Convert.ToInt64(Session["ID_Company"]);

                blWorkFlow.WorkFlowCode = SearchItem;
                blWorkFlow.WorkFlowName = SearchItem;

                dtbl = blWorkFlow.SelectAllData();
                return(Json(Converttojson(dtbl), JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                ///
                return(Json(ex));
            }
        }