private void ShowInfo(string _order_no) { PanelOrder.Visible = true; ax_orders model = new ax_orders(); model.GetModel(_order_no); contact_address.Text = model.address; contact_name.Text = model.user_name; contact_tel.Text = model.user_tel; message.Text = model.message; remark.Text = model.remark; if (Convert.ToInt32(model.depot_category_id) != 0) { //depot_category.Text = new ax_depot_category().GetTitle(Convert.ToInt32(model.depot_category_id)); depot_category.Text = "<font color=red>已发货</font>"; } else { depot_category.Text = "<font color=red>未发货</font>"; } //绑定商品列表 ax_order_goods bll = new ax_order_goods(); string sql = " order_id =" + model.id; DataTable dt = bll.GetList(sql).Tables[0]; this.rptList.DataSource = dt; this.rptList.DataBind(); }
private void ShowInfo(string _order_no) { ax_orders model = new ax_orders(); model.GetModel(_order_no); ax_product_category bll2 = new ax_product_category(); DataTable dt = bll2.GetList("1=1").Tables[0]; ddlExpressId.Items.Clear(); ddlExpressId.Items.Add(new ListItem("请选择快递公司", "")); foreach (DataRow dr in dt.Rows) { ddlExpressId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString())); } ax_depot_category bll3 = new ax_depot_category(); DataTable dt3 = bll3.GetList("1=1").Tables[0]; ddlDepotId.Items.Clear(); ddlDepotId.Items.Add(new ListItem("请选择发货仓库", "")); foreach (DataRow dr in dt3.Rows) { ddlDepotId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString())); } txtExpressNo.Text = model.product_no; ddlDepotId.SelectedValue = model.depot_category_id.ToString(); ddlExpressId.SelectedValue = model.product_category_id.ToString(); }
private void ShowInfo(int _id) { model.GetModel(_id); //绑定商品列表 ax_order_goods bll = new ax_order_goods(); string sql = " order_id =" + _id; DataTable dt = bll.GetList(sql).Tables[0]; this.rptList.DataSource = dt; this.rptList.DataBind(); //获得收货人信息 contact_address.Text = model.address; contact_name.Text = model.user_name; contact_tel.Text = model.user_tel; //根据订单状态,显示各类操作按钮 switch (model.status) { case 1: //订单为已生成状态 //取消订单显示 if (roleview(Convert.ToInt32(Session["RoleID"]), 39, "Cancel")) { btnCancel.Visible = true; } //修改订单备注、修改收货信息按钮显示 if (roleview(Convert.ToInt32(Session["RoleID"]), 39, "Edit")) { btnEditRemark.Visible = true; btnEditAcceptInfo.Visible = true; btnEditExpress.Visible = true; } break; case 2: //如果订单为已确认状态 //完成显示 if (roleview(Convert.ToInt32(Session["RoleID"]), 39, "Confirm")) { btnComplete.Visible = true; } //修改订单备注按钮可见 if (roleview(Convert.ToInt32(Session["RoleID"]), 39, "Edit")) { btnEditRemark.Visible = true; } break; } }