protected void Page_Load(object sender, EventArgs e) { if (!Power("supplier_order_edit", "编辑订单")) { NewPageNoPower(); } int id = RequestTool.RequestInt("id", 0); model = B_Lebi_Order.GetModel("Supplier_id = " + CurrentSupplier.id + " and id = " + id); if (model == null) { PageError(); return; } else { shop = CurrentSupplier; if (shop == null) { shop = new Lebi_Supplier(); } if (CurrentSupplier.id != model.Supplier_id) { PageError(); return; } } if (model.Type_id_OrderType == 212) { str = "- "; } //if (model.Type_id_OrderType == 212) // Response.Redirect("Torder_view.aspx?id=" + id); pros = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", ""); Logs = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc"); torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + "", "id desc"); comms = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + "", "id desc"); langs = Language.Languages(); Lebi_Bill bill = B_Lebi_Bill.GetModel("Order_id=" + model.id + ""); if (bill == null) { billstatus = Tag("不开发票"); } else { billstatus = Tag(EX_Type.TypeName(bill.Type_id_BillStatus)); } TransportCount = B_Lebi_Transport_Order.Counts("Order_id=" + model.id + ""); CommentCount = B_Lebi_Comment.Counts("TableName='Order' and Keyid=" + model.id + ""); LogCount = B_Lebi_Log.Counts("TableName='Order' and Keyid='" + model.id + "'"); deliveries = B_Lebi_Supplier_Delivery.GetList("Supplier_id = " + model.Supplier_id + "", "Sort desc"); DeliveryCount = B_Lebi_Supplier_Delivery.Counts("Supplier_id = " + model.Supplier_id + ""); }
protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("order_edit", "编辑订单")) { NewPageNoPower(); } int id = RequestTool.RequestInt("id", 0); model = B_Lebi_Order.GetModel(id); if (model == null) { model = new Lebi_Order(); shop = new Lebi_Supplier(); } else { if (model.Supplier_id > 0) { shop = B_Lebi_Supplier.GetModel(model.Supplier_id); } if (shop == null) { shop = new Lebi_Supplier(); } if (domain3admin && CurrentAdmin.Site_ids != "") { if (!("," + CurrentAdmin.Site_ids + ",").Contains("," + model.Site_id + ",")) { PageError(); return; } } } if (model.Type_id_OrderType == 212) { str = "- "; } //if (model.Type_id_OrderType == 212) // Response.Redirect("Torder_view.aspx?id=" + id); pros = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", ""); Logs = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc"); torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + "", "id desc"); comms = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + "", "id desc"); langs = Language.Languages(); Lebi_Bill bill = B_Lebi_Bill.GetModel("Order_id=" + model.id + ""); if (bill == null) { billstatus = Tag("不开发票"); } else { billstatus = EX_Type.TypeName(bill.Type_id_BillStatus); } TransportCount = B_Lebi_Transport_Order.Counts("Order_id=" + model.id + ""); CommentCount = B_Lebi_Comment.Counts("TableName='Order' and Keyid=" + model.id + ""); LogCount = B_Lebi_Log.Counts("TableName='Order' and Keyid='" + model.id + "'"); deliveries = B_Lebi_Supplier_Delivery.GetList("Supplier_id = " + model.Supplier_id + "", "Sort desc"); DeliveryCount = B_Lebi_Supplier_Delivery.Counts("Supplier_id = " + model.Supplier_id + ""); if (model.Promotion_Type_ids != "") { //List<Lebi_Promotion_Type> Promotions = B_Lebi_Promotion_Type.GetList("id in (" + model.Promotion_Type_ids + ")", ""); //foreach (Lebi_Promotion_Type p in Promotions) //{ // if (Promotion == "") // Promotion = Lang(p.Name); // else // Promotion += "<br/>" + Lang(p.Name); //} Promotion = Lang(model.Promotion_Type_Name); } }