protected string billstatus = "";//发票状态 protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("order_edit", "编辑订单")) { NewPageNoPower(); } int id = RequestTool.RequestInt("id", 0); string where = "id = " + id + ""; if (!string.IsNullOrEmpty(EX_Admin.Project().Site_ids)) { where += " and (Site_id in (" + EX_Admin.Project().Site_ids + "))"; } if (!string.IsNullOrEmpty(EX_Admin.Project().Supplier_ids)) { where += " and (Supplier_id in (" + EX_Admin.Project().Supplier_ids + "))"; } model = B_Lebi_Order.GetModel(where); if (model == null) { model = new Lebi_Order(); } if (domain3admin && CurrentAdmin.Site_ids != "") { if (!("," + CurrentAdmin.Site_ids + ",").Contains("," + model.Site_id + ",")) { PageError(); return; } } oldmodel = B_Lebi_Order.GetModel(model.Order_id); if (oldmodel == null) { oldmodel = new Lebi_Order(); } //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); } }
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 string billstatus = "";//发票状态 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(id); if (model == null) { model = new Lebi_Order(); } 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 + " and Supplier_id = " + CurrentSupplier.id + "", ""); Logs = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc"); torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + " and Supplier_id = " + CurrentSupplier.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)); } }
protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("bill_edit", "修改发票")) { WindowNoPower(); } int id = RequestTool.RequestInt("id", 0); int orderid = RequestTool.RequestInt("orderid", 0); model = B_Lebi_Bill.GetModel(id); Lebi_Order order = B_Lebi_Order.GetModel(orderid); if (order == null) { order = new Lebi_Order(); } if (order.id > 0 && model == null) { model = B_Lebi_Bill.GetModel("Order_id=" + order.id + ""); if (model == null) { model = new Lebi_Bill(); model.Order_Code = order.Code; model.Order_id = order.id; model.User_id = order.User_id; model.User_UserName = order.User_UserName; model.Type_id_BillStatus = 160; } } if (model == null) { model = new Lebi_Bill(); model.Type_id_BillStatus = 160; } }
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); } }