public JsonResult QueryFixOrder(string sid) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { string azs = ""; string odate = ""; B_FixOrder sal = new B_FixOrder(); sal = bfb.Query(" and sid='" + sid + "'"); List <B_FixOrderTask> bfot = bfotb.QueryList(" and sid='" + sid + "'"); if (bfot != null) { foreach (B_FixOrderTask bt in bfot) { azs = azs + bt.azs + ";"; odate = bt.odate; } } if (sal != null) { sal.fixter = azs; sal.fixdate = odate; } d.d = js.Serialize(sal); } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult SaveFixOrder(string address, string code, string customer, string remark, string sid, string telephone) { JsonData d = new JsonData(); B_FixOrder bf = new B_FixOrder(); CB_OrderState cos = new CB_OrderState(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { bf.cdate = DateTime.Now.ToString(); bf.scode = code; bf.customer = customer; bf.telephone = telephone; bf.address = address; bf.dcode = "01080101"; bf.dname = "北京市"; bf.remark = remark; bf.maker = iv.u.ename; if (sid == "") { if (bfb.Exists(" and scode='" + bf.scode + "'")) { d.d = "T"; } else { bf.sid = CommonBll.GetSid(); if (bfb.Add(bf) > 0) { cos.sid = bf.sid; cosb.Add(cos); bwfb.CreateWorkFlow(bf.sid, "0077"); d.d = bf.sid; } else { d.d = "F"; } } } else { bf.sid = sid; if (bfb.Exists(" and scode='" + bf.scode + "' and sid<>'" + sid + "'")) { d.d = "T"; } else { if (bfb.Update(bf)) { d.d = bf.sid; } else { d.d = "F"; } } } } else { d.d = iv.badstr; } return(Json(d)); }