Beispiel #1
0
        public static string SaveOverCondition(string tattr, string tbvalue, string tcity, string tcode, string tid, string tjs, string tlcode, string tlname, string tname,
                                               string tprice, string tsz, string ttvalue, string ttype, string txs
                                               )
        {
            string r = "";
            Sys_OverConditionBll snsb = new Sys_OverConditionBll();
            SessionUserValidate  iv   = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                Sys_OverCondition s = new Sys_OverCondition();
                s.oname      = tlname;
                s.ocode      = tlcode;
                s.cname      = tname;
                s.ccode      = tcode;
                s.bvalue     = Convert.ToInt32(tbvalue);
                s.tvalue     = Convert.ToInt32(ttvalue);;
                s.cattr      = tattr;
                s.cfscale    = Convert.ToDecimal(tsz);
                s.cfstr      = tjs;
                s.cxs        = Convert.ToDecimal(txs);
                s.cpricetype = tprice;
                s.cdate      = DateTime.Now.ToString();
                s.pcity      = tcity;
                s.maker      = iv.u.ename;
                if (tid == "0")
                {
                    if (snsb.Add(s) > 0)
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    if (snsb.Update(s))
                    {
                        r = "S";
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }