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

            if (iv.f)
            {
                VGatherOrder     vg  = new VGatherOrder();
                B_CustormOrder   bco = bcob.Query(" and csid='" + sid + "'");
                A_CustomeAccount bcg = acab.Query(" and sid='" + sid + "'");
                if (bcg != null)
                {
                    vg.customer = bco.customer;
                    vg.wcode    = bco.wcode;
                    vg.gmethod  = bcg.pmethod;
                    vg.gmoney   = bcg.pmoney;
                    vg.gperson  = bcg.maker;
                    vg.remark   = bcg.remark;
                    vg.gdate    = bcg.ddate;
                }
                else
                {
                    vg.customer = bco.customer;
                    vg.wcode    = bco.wcode;
                    vg.gmoney   = 0;
                }
                r = js.Serialize(vg);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #2
0
        public static string SaveGatherOrder(string gdate, string gmoney, string gmethod, string gperson, string gremark, string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_CustormOrder   bco = bcob.Query(" and csid='" + sid + "'");
                A_CustomeAccount bcg = new A_CustomeAccount();
                bcg.gsid      = CommonBll.GetSid();
                bcg.address   = bco.address;
                bcg.customer  = bco.customer;
                bcg.telephone = bco.telephone;
                bcg.citycode  = bco.e_citycode;
                bcg.cityname  = bco.e_city;
                bcg.dcode     = bco.dcode;
                bcg.dname     = bco.dname;
                bcg.pcate     = "订金";
                bcg.scode     = bco.wcode;
                bcg.ptype     = 1;
                bcg.pstate    = 0;
                bcg.pmethod   = gmethod;
                bcg.pmoney    = Convert.ToDecimal(gmoney);
                bcg.maker     = gperson;
                bcg.remark    = gremark;
                bcg.ddate     = CommonBll.GetBdate(gdate);
                bcg.cdate     = DateTime.Now.ToString();
                bcg.sid       = sid;
                if (acab.Exists(" and sid='" + sid + "'"))
                {
                    if (acab.UpdateEx(bcg))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (acab.Add(bcg) > 0)
                    {
                        bwfb.CreateWorkFlow(bcg.gsid, "0092");
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #3
0
        public static string SaveCustomeAccount(string address, string citycode, string cityname, string customer, string dcode, string dname, string gsid, string id, string pcate, string pmoney, string remark, string scode, string telephone)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                A_CustomeAccount sd = new A_CustomeAccount();
                sd.citycode  = citycode;
                sd.cityname  = cityname;
                sd.dcode     = dcode;
                sd.dname     = dname;
                sd.customer  = customer;
                sd.telephone = telephone;
                sd.address   = address;
                sd.pmoney    = Convert.ToDecimal(pmoney);
                sd.ptype     = 1;
                sd.scode     = scode;
                sd.pstate    = 0;
                sd.pcate     = pcate;
                sd.sid       = "";
                sd.gsid      = CommonBll.GetSid();
                sd.ddate     = DateTime.Now.ToString();
                sd.cdate     = DateTime.Now.ToString();
                sd.remark    = remark;
                sd.maker     = iv.u.ename;
                if (id == "" || id == "0")
                {
                    if (acab.Add(sd) > 0)
                    {
                        bwfb.CreateWorkFlow(sd.gsid, "0092");
                        r = sd.gsid;
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    sd.gsid = gsid;
                    if (acab.Update(sd))
                    {
                        r = sd.gsid;
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #4
0
        public static string InitCustomeAccount(string id, string ptype)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                A_CustomeAccount sd = new A_CustomeAccount();
                if (id == "")
                {
                    Sys_Depment sdm = sdb.Query(" and dcode='" + iv.u.dcode + "' and dattr='d'");
                    if (sdm != null)
                    {
                        Sys_Depment sc = sdb.Query(" and dcode='" + sdm.dcode.Substring(0, sdm.dcode.Length - 2) + "' and dattr='s'");
                        if (ptype == "g")
                        {
                            sd.pcate = "补款";
                        }
                        if (ptype == "p")
                        {
                            sd.pcate = "退款";
                        }
                        sd.citycode  = sc.dcode;
                        sd.cityname  = sc.dname;
                        sd.dcode     = sdm.dcode;
                        sd.dname     = sdm.dname;
                        sd.customer  = "";
                        sd.telephone = "";
                        sd.address   = "";
                        sd.pmoney    = 0;
                        sd.id        = 0;
                    }
                    else
                    {
                        r = "PB";
                    }
                }
                else
                {
                    sd = acab.Query(" and gsid='" + id + "'");
                }
                r = js.Serialize(sd);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
Example #5
0
        public static string AllSearchCustomeAccountInfo(string telephone)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                A_CustomeAccount sd = acab.Query(" and telephone='" + telephone + "'");
                if (sd != null)
                {
                    r = js.Serialize(sd);
                }
                else
                {
                    r = "";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }