示例#1
0
        public static string InitOrder(string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_PreWjOrder bpw = new B_PreWjOrder();
                if (sid == "")
                {
                    bpw.wjcode = "BW" + DateTime.Now.ToString("yyyyMMddHHmmss");
                    bpw.id     = 0;
                    bpw.sid    = CommonBll.GetSid();
                }
                else
                {
                    bpw = bpwb.Query(" and sid='" + sid + "'");
                }
                r = js.Serialize(bpw);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
示例#2
0
        public static string LoadWjOrder(string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_PreWjOrder bco = bpwob.Query(" and sid='" + sid + "'");
                r = js.Serialize(bco);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
示例#3
0
        public static string SaveWjOrder(string city, string code, string id, string remark, string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_PreWjOrder bpw = new B_PreWjOrder();
                bpw.sid    = sid;
                bpw.wjcode = code;
                bpw.cdate  = DateTime.Now.ToString();
                bpw.e_city = city;
                bpw.maker  = iv.u.ename;
                bpw.remark = remark;
                if (id == "0")
                {
                    if (bpwb.Add(bpw) > 0)
                    {
                        bwfb.CreateWorkFlow(bpw.sid, "0054");
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (bpwb.Update(bpw))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }