/// <summary> /// 订单分配 /// </summary> public void InstallerAssign() { var json = Request["data"]; var rows = (ArrayList)PluSoft.Utils.JSON.Decode(json); foreach (Hashtable row in rows) { var orderId = Convert.ToInt32(row["OrderId"]); var detailCount = new Sys.BLL.OrderStatusFlow().GetRecordCount("OrderId=" + orderId); if (detailCount > 0) { Response.Write("-1"); return; } else { var model = new Sys.BLL.Orders().GetModel(orderId); if (model != null) { model.WorkerId = row["newWorkerId"].ToString(); var result = new Sys.BLL.Orders().Update(model); if (result) { Response.Write("1"); } } } } }
public void GetOrderFlow() { int id = PageRequest.GetInt("orderId", 0); var dt = new Sys.BLL.OrderStatusFlow().GetList("OrderId=" + id).Tables[0]; if (dt != null) { DataView dv = dt.DefaultView; dv.Sort = "FlowId desc"; dt = dv.ToTable(); } var json = PluSoft.Utils.JSON.Encode(dt); Response.Write(json); }