コード例 #1
0
        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();
        }
コード例 #2
0
        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());
        }
コード例 #3
0
        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());
        }
コード例 #4
0
        public static List <Flow> getFlow()
        {
            FlowDBDataContext linq = new FlowDBDataContext();

            return(linq.Flows.OrderBy(a => a.Name).ToList());
        }
コード例 #5
0
        public void DoAfterFlowSucceed(string formObj, Models.flow_apply app)
        {
            FlowDBDataContext db = new FlowDBDataContext();

            db.DoAfterFinishTI(app.sys_no);
        }