public string GetMyAppFlowInstances([FromUri] FlowInstanModel paramters) { try { DbHelper.Open(); //我发起的流程-1,已办任务-2 int myflowtype = 1; if (paramters.myflowtype != 0) { myflowtype = paramters.myflowtype; } int index = paramters.pageindex; int psize = 15; if (paramters.pagesize != 0) { psize = paramters.pagesize; } string filter = ""; if (!string.IsNullOrWhiteSpace(paramters.filter)) { filter = paramters.filter; } string sortstr = string.Empty; if (string.IsNullOrWhiteSpace(paramters.sortstr)) { sortstr = "actdt desc"; } int rowCount = 0; DataTable dt = WorkFlowDac.Instance.GetMyAppFlowInstance4MobileApp(paramters.userid, myflowtype, psize, index, ref rowCount, filter, sortstr); return(DCHelper.ModelListToJson(dt, rowCount, paramters.pageindex, paramters.pagesize)); } catch (Exception ex) { return(DCHelper.ErrorMessage(ex.Message)); } finally { DbHelper.Close(); } }
public string GetPendingTaskInstances([FromUri] BaseListModel paramters) { try { DbHelper.Open(); int index = paramters.pageindex; int psize = 15; if (paramters.pagesize != 0) { psize = paramters.pagesize; } string filter = ""; if (!string.IsNullOrWhiteSpace(paramters.filter)) { filter = paramters.filter; } string sortstr = ""; if (!string.IsNullOrWhiteSpace(paramters.sortstr)) { sortstr = paramters.sortstr; } int rowCount = 0; DataTable dt = WorkFlowDac.Instance.GetPendingTaskInstances4MobileApp(paramters.userid, psize, index, ref rowCount, filter, sortstr); return(DCHelper.ModelListToJson(dt, rowCount, paramters.pageindex, paramters.pagesize)); } catch (Exception ex) { return(DCHelper.ErrorMessage(ex.Message)); } finally { DbHelper.Close(); } }