Exemple #1
0
        public static string UpdateAppointment(string sid, string cv, string gv, string vv, string sv)
        {
            string r = "";
            B_AfterFreeBackOrder b  = new B_AfterFreeBackOrder();
            SessionUserValidate  iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                b.sid     = sid;
                b.sdate   = CommonBll.GetBdate(cv);
                b.gofee   = Convert.ToDecimal(gv);
                b.servfee = Convert.ToDecimal(vv);
                b.stext   = sv;
                if (bsob.UpdateAppointment(b))
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #2
0
        public static string initOrder(string sid, string asid)
        {
            string r = "";
            SessionUserValidate  iv = SysValidateBll.ValidateSession();
            B_AfterReModifyOrder ao = new B_AfterReModifyOrder();

            if (iv.f)
            {
                if (sid != "")
                {
                    ao = basob.Query(" and sid='" + sid + "'");
                    r  = js.Serialize(ao);
                }
                else
                {
                    if (asid != "")
                    {
                        B_AfterFreeBackOrder bo = bsob.Query(" and sid='" + asid + "'");
                        ao.city      = bo.city;
                        ao.citycode  = bo.citycode;
                        ao.dcode     = bo.dcode;
                        ao.dname     = bo.dname;
                        ao.acity     = bo.acity;
                        ao.aprovince = bo.aprovince;
                        ao.areason   = bo.areason;
                        ao.ascode    = bo.scode;
                        ao.asid      = bo.sid;
                        ao.osid      = bo.osid;
                        ao.otype     = bo.otype;
                        ao.customer  = bo.customer;
                        ao.telephone = bo.telephone;
                        ao.remark    = bo.remark;
                        ao.maker     = iv.u.ename;
                        ao.oscode    = bo.oscode;
                    }
                    else
                    {
                        Sys_Depment sd = sdb.Query(" and dcode='" + iv.u.dcode + "'");
                        ao.id       = 0;
                        ao.dcode    = iv.u.dcode;
                        ao.dname    = iv.u.dname;
                        ao.city     = sd.dpname;
                        ao.citycode = sd.dpcode;
                        ao.maker    = iv.u.ename;
                    }
                    r = js.Serialize(ao);
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #3
0
        public static string InitAddOrder(string sid, string asid)
        {
            string r = "";
            SessionUserValidate  iv = SysValidateBll.ValidateSession();
            B_AfterFreeBackOrder ao = new B_AfterFreeBackOrder();

            if (iv.f)
            {
                #region//存在原单
                if (sid != "")
                {
                    ao = bsob.Query(" and sid='" + sid + "'");
                }
                #endregion
                #region//不存在原单
                if (sid == "")
                {
                    if (asid != "")
                    {
                        B_AfterApplyOrder aao = basob.Query(" and sid='" + asid + "'");
                        if (aao != null)
                        {
                            ao.id        = 0;
                            ao.dcode     = aao.dcode;
                            ao.acity     = aao.acity;
                            ao.aprovince = aao.aprovince;
                            ao.sscode    = aao.scode;
                            ao.address   = aao.address;
                            ao.areason   = aao.areason;
                            ao.customer  = aao.customer;
                            ao.oscode    = aao.oscode;
                            ao.osid      = aao.osid;
                            ao.asid      = aao.sid;
                            ao.stext     = aao.remark;
                            ao.telephone = aao.telephone;
                            ao.maker     = iv.u.ename;
                        }
                    }
                    else
                    {
                        ao.maker = iv.u.ename;
                    }
                }
                #endregion
                r = js.Serialize(ao);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #4
0
        public static string QueryOrder(string sid)
        {
            string r = "";
            SessionUserValidate  iv = SysValidateBll.ValidateSession();
            B_AfterFreeBackOrder ao = new B_AfterFreeBackOrder();

            if (iv.f)
            {
                #region//存在原单
                if (sid != "")
                {
                    ao = bsob.Query(" and sid='" + sid + "'");
                }
                #endregion
                r = js.Serialize(ao);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #5
0
        public static string SetServiceOver(string sid, string otype, string odate, string oinfo, string cinfo, string fmoney)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_AfterReModifyOrder bo = basmob.Query(" and sid='" + sid + "'");
                if (bo != null)
                {
                    if (basmob.SetOverInfo(sid, otype, odate, oinfo, cinfo, fmoney))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                B_AfterFreeBackOrder bao = bsob.Query(" and sid='" + sid + "'");
                if (bao != null)
                {
                    if (bsob.SetOverInfo(sid, otype, odate, oinfo, cinfo))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #6
0
        public static string SetFixter(string sid, string azperson)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_AfterReModifyOrder bo = basmob.Query(" and sid='" + sid + "'");
                if (bo != null)
                {
                    if (basmob.SetFixer(sid, azperson))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                B_AfterFreeBackOrder bao = bsob.Query(" and sid='" + sid + "'");
                if (bao != null)
                {
                    if (bsob.SetFixer(sid, azperson))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Exemple #7
0
        public static string SaveOrder(string acity, string address, string aprovince, string areason, string asid, string bcode, string customer, string dcode, string emcode, string gofee, string maker, string oscode, string osid, string remark, string sdate, string servfee, string sid, string sscode, string stext, string telephone)
        {
            string r = "";
            B_AfterFreeBackOrder b  = new B_AfterFreeBackOrder();
            SessionUserValidate  iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_Depment sd = sdb.Query(" and dcode='" + dcode + "'");
                Sys_Depment cs = sdb.Query(" and dcode='" + dcode.Substring(0, dcode.Length - 4) + "'");
                b.osid      = osid;
                b.asid      = asid;
                b.address   = address;
                b.acity     = acity;
                b.aprovince = aprovince;
                b.customer  = customer;
                b.telephone = telephone;
                b.dcode     = dcode;
                b.dname     = sd.dname;
                b.city      = cs.dname;
                b.citycode  = cs.dcode;
                b.maker     = iv.u.ename;
                b.oscode    = oscode;
                b.sscode    = sscode;
                b.gofee     = Convert.ToDecimal(gofee);
                b.servfee   = Convert.ToDecimal(servfee);
                b.sdate     = CommonBll.GetBdate(sdate);
                b.stext     = stext;
                b.remark    = remark;
                b.scode     = "HAS" + DateTime.Now.ToString("yyMM") + bsob.GetOrderNum().ToString().PadLeft(5, '0');
                b.areason   = areason;
                b.telephone = telephone;
                b.cdate     = DateTime.Now.ToString("yyyy-MM-dd");
                if (sid == "")
                {
                    b.sid = CommonBll.GetSid();
                    if (bsob.Add(b) > 0)
                    {
                        r = b.sid;
                        CB_OrderState cos = new CB_OrderState();
                        cos.sid = b.sid;
                        cosb.Add(cos);
                        bwfb.CreateWorkFlow(b.sid, emcode);
                    }
                    else
                    {
                        r = "F";
                    }
                    EventBtnDo.FireEventBtn(b.sid, bcode, "1", "创建售后单");
                }
                else
                {
                    b.sid = sid;
                    if (bsob.Update(b))
                    {
                        r = b.sid;
                    }
                    else
                    {
                        r = "F";
                    }
                    EventBtnDo.FireEventBtn(b.sid, bcode, "1", "更新售后单");
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }