private void ShowInfo(int _id) { model.GetModel(_id); //绑定商品列表 ps_order_goods bll = new ps_order_goods(); string sql = " order_id =" + _id; DataTable dt = bll.GetList(sql).Tables[0]; this.rptList.DataSource = dt; this.rptList.DataBind(); //获得商家信息 if (model.depot_id > 0) { ps_depot user_info = new ps_depot(); user_info.GetModel(Convert.ToInt32(model.depot_id)); user_name.Text = model.user_name; title.Text = user_info.title; contact_address.Text = user_info.contact_address; contact_name.Text = user_info.contact_name; contact_tel.Text = user_info.contact_mobile; } //根据订单状态,显示各类操作按钮 switch (model.status) { case 1: //订单为已生成状态 //确认订单、取消订单显示 btnConfirm.Visible = btnCancel.Visible = true; //修改订单备注、调价按钮显示 btnEditRemark.Visible = btnEditPaymentFee.Visible = true; break; case 2: //如果订单为已确认状态 //完成显示 btnComplete.Visible = true; //修改订单备注按钮可见 btnEditRemark.Visible = true; break; } }
private void ShowInfo(string _order_no) { model.GetModel(_order_no); ps_order_goods bll = new ps_order_goods(); string sql = " order_id =" + model.id; DataTable dt = bll.GetList(sql).Tables[0]; this.rptList.DataSource = dt; this.rptList.DataBind(); //获得商家信息 if (model.depot_id > 0) { ps_depot user_info = new ps_depot(); user_info.GetModel(Convert.ToInt32(model.depot_id)); title.Text = user_info.title; contact_address.Text = user_info.contact_address; contact_name.Text = user_info.contact_name; contact_tel.Text = user_info.contact_mobile; } }