public static string InitPayOrder(string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_CityPayOrder bcp = new B_CityPayOrder(); if (sid != "") { bcp = bcpob.Query(" and sid='" + sid + "'"); } else { bcp.sid = CommonBll.GetSid(); bcp.dname = iv.u.dname; bcp.dcode = iv.u.dcode; bcp.pstate = 0; bcp.cdate = DateTime.Now.ToString(); bcp.maker = iv.u.ename; bcp.id = 0; bcpob.AddDraft(bcp); } r = js.Serialize(bcp); } else { r = iv.badstr; } return(r); }
public static string InitOrder(string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_CityPayOrder bpo = new B_CityPayOrder(); if (sid == "") { bpo.dcode = iv.u.dcode; bpo.dname = iv.u.dname; bpo.maker = iv.u.ename; } else { bpo = bcpob.Query(" and sid='" + sid + "'"); } r = js.Serialize(bpo); } else { r = iv.badstr; } return(r); }
public static string QueryPayOrder(string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { VCPaymentOrder vp = new VCPaymentOrder(); B_CityPayOrder bcp = new B_CityPayOrder(); if (sid != "") { StringBuilder mhtm = new StringBuilder(); CB_OrderState cos = cosb.Query(" and sid='" + sid + "'"); bcp = bcpob.Query(" and sid='" + sid + "'"); vp.caccount = bcp.caccount; vp.cbank = bcp.cbank; vp.cdate = CommonBll.GetBdate(bcp.cdate); vp.ctype = bcp.ctype; vp.dname = bcp.dname; vp.kj = ""; vp.maker = bcp.maker; vp.paccount = bcp.paccount; vp.pbank = bcp.pbank; vp.pcode = bcp.pcode; vp.pdate = CommonBll.GetBdate(bcp.pdate); vp.pmethod = bcp.pmethod; vp.pmoney = bcp.pmoney.ToString(); vp.remark = bcp.remark; if (cos.iover > 0) { vp.zt = "取消"; } else { vp.zt = "正常"; } List <B_PayImg> lbp = bpib.QueryList(" and sid='" + sid + "' and ptype='cp'"); if (lbp != null) { foreach (B_PayImg b in lbp) { mhtm.AppendFormat("<img id='{0}' onclick='nck(this.id)' src='{1}' alt='' style='width:100%'/><br>", b.id, b.url); } } vp.ming = mhtm.ToString(); } r = js.Serialize(vp); } else { r = iv.badstr; } return(r); }
public static string QueryOrder(string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_CityPayOrder bpo = new B_CityPayOrder(); bpo = bcpob.Query(" and sid='" + sid + "'"); r = js.Serialize(bpo); } else { r = iv.badstr; } return(r); }
public static string SavePayOrder(string caccount, string cbank, string cperson, string ctype, string id, string paccount, string pbank, string pdate, string pmethod, string pmoney, string pperson, string remark, string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_CityPayOrder bcp = new B_CityPayOrder(); bcp.sid = sid; bcp.caccount = caccount; bcp.cbank = cbank; bcp.cperson = cperson; bcp.ctype = ctype; bcp.paccount = paccount; bcp.pbank = pbank; bcp.pdate = pdate; bcp.pmethod = pmethod; bcp.pmoney = Convert.ToDecimal(pmoney); bcp.pperson = pperson; bcp.pstate = 1; bcp.remark = remark; bcp.cdate = DateTime.Now.ToString(); bcp.maker = iv.u.ename; if (bcpob.Exists(" and pstate=0")) { bcp.pcode = "MKDP" + DateTime.Now.ToString("yyMMddhhmmss"); bwfb.CreateWorkFlow(bcp.sid, "0099"); cosb.Add(sid); } if (bcpob.Update(bcp)) { r = sid; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public static string SaveOrder(string account, string bcode, string city, string citycode, string emcode, string maker, string paccount, string pdate, string pmethod, string pmoney, string remark, string sid) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sbk_PaymentAccount pa = spab.Query(" and pcode=" + paccount + ""); Sbk_CollectionAccount ca = scab.Query(" and id=" + account + ""); B_CityPayOrder bco = new B_CityPayOrder(); bco.caccount = ca.aname; bco.cbank = ca.abank; bco.cperson = ca.aperson; bco.cbcode = ca.bcode; bco.ctype = ""; bco.dcode = citycode; bco.dname = city; bco.maker = maker; bco.paccount = pa.pname; bco.pbank = pa.pbank; bco.pbcode = pa.pbcode; bco.sacode = pa.sacode; bco.pcode = "P" + DateTime.Now.ToString("yyyyMMddHHmmss"); bco.pdate = pdate; bco.pmethod = pmethod; bco.pmoney = Convert.ToDecimal(pmoney); bco.pperson = pa.pperson; bco.pstate = 0; bco.remark = remark.Replace(",", ","); bco.maker = maker; bco.cdate = DateTime.Now.ToString(); if (sid == "") { CB_OrderState cos = new CB_OrderState(); bco.sid = CommonBll.GetSid(); bco.pimg = qcb.CreateQtCode(System.Web.HttpContext.Current.Server.MapPath("/UpFile/OrderQt/"), CommonBll.GetHost() + "UIClient/SalesBusiness/DistributorOrder/SaleOrderDetail.htm?Sid=" + bco.sid); if (bcpob.Add(bco) > 0) { bwfb.CreateWorkFlow(bco.sid, emcode); cos.sid = bco.sid; cosb.Add(cos); r = bco.sid; } else { r = "F"; } EventBtnDo.FireEventBtn(bco.sid, bcode, "1", " 保存订单"); } else { bco.sid = sid; if (bcpob.Update(bco)) { r = bco.sid; } else { r = "F"; } EventBtnDo.FireEventBtn(bco.sid, bcode, "1", " 更改订单"); } } else { r = iv.badstr; } return(r); }