📄 leavemodfy.aspx.cs
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;
namespace YXShop.Web.Admin.Orders
{
public partial class leaveModfy : System.Web.UI.Page
{
public static string orderId= "";
public static int ID = 0;
YXShop.BLL.OrderLeave bll = new YXShop.BLL.OrderLeave();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["AdminID"] == null)
{
Response.Redirect("../index.aspx", true);
}
else
{
if (string.IsNullOrEmpty(Session["AdminID"].ToString()))
{
Response.Redirect("../index.aspx", true);
}
}
if ((!IsPostBack) || ((Request["Event"] != null) && (Request["Event"] != "")))
{
//初始化信息(订单信息,银行信息,支付信息)
if (YXShop.Common.WebUtility.isNumeric(Request.QueryString["ID"]))
{
//bindOrderInfo(YXShop.Common.WebUtility.replaceStr(Request.QueryString["OrderID"]));
ID = int.Parse(Request.QueryString["ID"]);
BindReLeave(ID);
}
else
{
Response.Redirect("leaveInfo.aspx");
}
}
}
private void BindReLeave(int ID)
{
string str = " ID = " + ID;
YXShop.BLL.UserCommon ucBll = null;
List<YXShop.Model.OrderLeave> list = bll.GetList(str);
if (list.Count > 0)
{
string userName = "";
ucBll = new YXShop.BLL.UserCommon();
if (list[0].State == 1)
{
HiddenField1.Value = list[0].MemberID.ToString();
orderId = list[0].OrderID;
HiddenField2.Value = orderId;
List<YXShop.Model.UserCommon> ucList= ucBll.GetListByColumn("UID", list[0].MemberID);
if (ucList.Count == 1)
{
userName = ucList[0].UserName;
}
Label1.Text = userName;
Label2.Text = list[0].CreateDate.ToString();
TextBox1.Text = list[0].Content;
}
try
{
if (list[1].State == 1)
{
}
}
catch { }
}
}
protected void Button1_Click(object sender, EventArgs e)
{
YXShop.Model.OrderLeave leavModel = new YXShop.Model.OrderLeave();
leavModel.ID = ID;
leavModel.MemberID = Convert.ToInt32(HiddenField1.Value);
leavModel.OrderID = HiddenField2.Value;
leavModel.Content = YXShop.Common.WebUtility.replaceStr(TextBox1.Text);
leavModel.CreateDate = DateTime.Parse(Label2.Text);
leavModel.State = 1;
try
{
bll.Update(leavModel);
YXShop.Common.alert.show("反馈信息修改成功!");
}
catch
{
}
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("leaveInfo.aspx?OrderID=" + orderId, true);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -