public JsonResult QueryFixOrderMoney(string sid) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_FixMoney sal = new B_FixMoney(); sal = bfmb.Query(" and sid='" + sid + "'"); d.d = js.Serialize(sal); } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult UpdateFixOrderMoney(string sid, string amoney, string dmoney, string mremark, List <String[]> prow) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { ArrayList pml = new ArrayList(); B_FixMoney bfm = new B_FixMoney(); bfm.amoney = Convert.ToDecimal(amoney); bfm.dmoney = 0 - Convert.ToDecimal(dmoney); bfm.sid = sid; bfm.premark = mremark; bfm.cdate = DateTime.Now.ToString(); bfm.maker = iv.u.ename; if (prow != null) { foreach (String[] s in prow) { ArrayList al = new ArrayList(); al.Add(s[0]); al.Add(s[2]); pml.Add(al); } } if (bfmb.UpdateFixMoney(bfm, pml)) { d.d = "S"; } else { d.d = "F"; } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult QueryFixAllMoney(string sid) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { decimal amoney = 0; decimal dmoney = 0; B_FixMoney bfm = bfmb.Query(" and sid='" + sid + "'"); if (bfm != null) { amoney = bfm.amoney; dmoney = bfm.dmoney; } decimal pmoney = bfpb.QueryOrderMoney(" and sid='" + sid + "'"); d.d = (amoney + dmoney + pmoney).ToString(); } else { d.d = iv.badstr; } return(Json(d)); }