示例#1
0
        public static string SetAgentsPrice(string dcode, string ptcode)
        {
            string              r   = "";
            Sys_PriceTypeBll    srb = new Sys_PriceTypeBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (srb.SetAgentsPrice(dcode, ptcode) > 0)
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
示例#2
0
        public static string DelPriceType(string ptcode)
        {
            string              r   = "";
            Sys_PriceTypeBll    srb = new Sys_PriceTypeBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                if (srb.Delete(" and ptcode='" + ptcode + "'"))
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
示例#3
0
        public static string SetPrice(string plb, string plist, string plx, string price, string tcprice, string pprice)
        {
            string              r   = "";
            Sys_PriceTypeBll    srb = new Sys_PriceTypeBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                string[] parr = plist.Split(';');
                if (srb.SetPrice(plb, parr, plx, Convert.ToDecimal(price), Convert.ToDecimal(tcprice), Convert.ToDecimal(pprice), iv.u.ename) > 0)
                {
                    r = "S";
                }
                else
                {
                    r = "F";
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
示例#4
0
        public static string SavePriceType(string lcode, string lid, string lms, string lname, string ltype)
        {
            string              r   = "";
            Sys_PriceTypeBll    srb = new Sys_PriceTypeBll();
            SessionUserValidate iv  = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_PriceType sr = new Sys_PriceType();
                if (iv.u.rcode == "xtgl")
                {
                    sr.dcode = "";
                }
                else
                {
                    sr.dcode = iv.u.dcode.Substring(0, 8);
                }
                sr.ptname = lname;
                sr.ptcode = lcode;
                sr.ptype  = ltype;
                sr.pms    = lms;
                sr.cdate  = DateTime.Now.ToString();
                sr.maker  = iv.u.ename;
                if (lid == "0")
                {
                    if (!srb.Exists(" and ptname='" + lname + "'"))
                    {
                        if (srb.Add(sr) > 0)
                        {
                            r = "S";
                        }
                        else
                        {
                            r = "F";
                        }
                    }
                    else
                    {
                        r = "T";
                    }
                }
                else
                {
                    if (!srb.Exists(" and ptname='" + lname + "' and ptcode<>'" + lcode + "'"))
                    {
                        if (srb.Update(sr))
                        {
                            r = "S";
                        }
                        else
                        {
                            r = "F";
                        }
                    }
                    else
                    {
                        r = "T";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }