public void CancelFlow(string sysNo, string cardNumber) { FlowDBDataContext db = new FlowDBDataContext(); var apply = db.flow_apply.Where(f => f.sys_no == sysNo).FirstOrDefault(); if (apply == null) { throw new Exception("流水单号不存在"); } if (apply.success == null) { throw new Exception("此申请还未完结,不能作废"); } if (apply.success == false) { throw new Exception("此申请已被NG,不能作废"); } apply.finish_date = DateTime.Now; apply.success = false; db.flow_applyEntry.InsertOnSubmit(new flow_applyEntry() { flow_apply = apply, auditors = cardNumber, final_auditor = cardNumber, pass = false, audit_time = DateTime.Now, opinion = "作废流程", step = 100, step_name = "申请人" }); db.SubmitChanges(); }
public static List <Flow> getFlow(string q, int page, int pageSize) { FlowDBDataContext linq = new FlowDBDataContext(); return(linq.Flows.Where(a => a.Name.Contains(q) || a.FullName.Contains(q)).Skip(page * pageSize).Take(pageSize).OrderBy(a => a.Name).ToList()); }
public static List <Flow> getFlow(string q) { FlowDBDataContext linq = new FlowDBDataContext(); return(linq.Flows.Where(a => a.Name.Contains(q) || a.FullName.Contains(q)).OrderBy(a => a.Name).ToList()); }
public static List <Flow> getFlow() { FlowDBDataContext linq = new FlowDBDataContext(); return(linq.Flows.OrderBy(a => a.Name).ToList()); }
public void DoAfterFlowSucceed(string formObj, Models.flow_apply app) { FlowDBDataContext db = new FlowDBDataContext(); db.DoAfterFinishTI(app.sys_no); }