コード例 #1
0
        public static string SaveCustomeMoney(string address, string csid, string customer, string emcode, string id, string omoney, string remark, string settlement, string sid, string telephone, string ycode)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_CustomeMoneyOrder bcmo = new B_CustomeMoneyOrder();
                bcmo.address    = address;
                bcmo.ccode      = "DJ" + DateTime.Now.ToString("yyyyMMddHHmmss");
                bcmo.cdate      = DateTime.Now.ToString();
                bcmo.sid        = sid;
                bcmo.csid       = csid;
                bcmo.customer   = customer;
                bcmo.maker      = iv.u.ename;
                bcmo.omoney     = Convert.ToDecimal(omoney);
                bcmo.telephone  = telephone;
                bcmo.ycode      = ycode;
                bcmo.settlement = settlement;
                bcmo.remark     = remark;
                if (id == "0")
                {
                    bcmo.csid = CommonBll.GetSid();
                    CB_OrderState cos = new CB_OrderState();
                    if (bcmob.Add(bcmo) > 0)
                    {
                        bwfb.CreateWorkFlow(bcmo.csid, emcode);
                        cos.sid = bcmo.csid;
                        cosb.Add(cos);
                        r = bcmo.csid;
                    }
                    else
                    {
                        r = "F";
                    }
                }
                else
                {
                    bcmo.csid = csid;
                    if (bcmob.Update(bcmo))
                    {
                        r = bcmo.csid;
                    }
                    else
                    {
                        r = "F";
                    }
                }
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }
コード例 #2
0
        public static string QueryCustomeMoney(string sid)
        {
            string r = "";
            SessionUserValidate iv = SysValidateBll.ValidateSession();

            if (iv.f)
            {
                B_CustomeMoneyOrder bcmo = bcmob.Query(" and csid='" + sid + "'");
                bcmo.ostate = cbeb.GetOrderState(sid);
                r           = js.Serialize(bcmo);
            }
            else
            {
                r = iv.badstr;
            }
            return(r);
        }