Example #1
0
        public static string RecoverProcess(string sid)
        {
            string              r    = "";
            BusiWorkFlowBll     snsb = new BusiWorkFlowBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                CB_ProcessRecord       cpr = new CB_ProcessRecord();
                CB_OrderProduceProcess p   = coppb.Query(" and id=" + sid + "");
                cpr.cdate  = DateTime.Now.ToString();
                cpr.jdname = p.jdname;
                cpr.jid    = p.id;
                cpr.maker  = iv.u.ename;
                cpr.rtext  = p.jdname + "恢复生产";
                cpr.sid    = p.sid;
                cprb.Add(cpr);
                if (coppb.UpState(sid, 0))
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #2
0
        public static string QueryProcess(string id)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                CB_OrderProduceProcess p = new CB_OrderProduceProcess();
                p = coppb.Query(" and id=" + id + "");
                r = js.Serialize(p);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #3
0
        public static string SaveLongTime(string id, string ldate, string remark)
        {
            string              r    = "";
            BusiWorkFlowBll     snsb = new BusiWorkFlowBll();
            SessionUserValidate iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                CB_ProcessRecord       cpr = new CB_ProcessRecord();
                CB_OrderProduceProcess p   = coppb.Query(" and id=" + id + "");
                DateTime d1 = Convert.ToDateTime(ldate);
                DateTime d2 = Convert.ToDateTime(CommonBll.GetBdate(p.ydate));
                TimeSpan ts = d1 - d2;
                int      d  = ts.Days;
                cpr.cdate  = DateTime.Now.ToString();
                cpr.jdname = p.jdname;
                cpr.jid    = p.id;
                cpr.maker  = iv.u.ename;
                cpr.rtext  = p.jdname + "预计完成日期" + p.ydate + "延期到" + ldate + ";延期说明:" + remark;
                cpr.sid    = p.sid;
                cprb.Add(cpr);
                List <CB_OrderProduceProcess> plist = coppb.QueryList(" and id>=" + p.id + " and sid='" + p.sid + "'");
                if (plist != null)
                {
                    foreach (CB_OrderProduceProcess cp in plist)
                    {
                        cp.ydate = Convert.ToDateTime(cp.ydate).AddDays(d).ToString();
                        coppb.SetLongTime(cp);
                    }
                }
                if (coppb.UpState(id, -1))
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }