📄 leaveinfo.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;
using System.Text;
namespace YXShop.Web.Admin.Orders
{
public partial class leaveInfo : System.Web.UI.Page
{
public static string orderId = "";
public static int dataNum = 0;
YXShop.BLL.OrderLeave leavBll = new YXShop.BLL.OrderLeave();
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(YXShop.Web.Admin.Orders.leaveInfo));
if ((!IsPostBack) || ((Request["Event"] != null) && (Request["Event"] != "")))
{
//初始化信息(订单信息,银行信息,支付信息)
if (!string.IsNullOrEmpty(Request.QueryString["OrderID"]))
{
//bindOrderInfo(YXShop.Common.WebUtility.replaceStr(Request.QueryString["OrderID"]));
orderId = YXShop.Common.WebUtility.replaceStr(Request.QueryString["OrderID"]);
BindLeave(orderId);
}
else
{
Response.Redirect("myOrderList.aspx");
}
}
}
/// <summary>
///
/// </summary>
/// <param name="orderId"></param>
private void BindLeave(string orderId)
{
string str = " OrderID = '" + orderId + "'";
List<YXShop.Model.OrderLeave> list = leavBll.GetList(str);
if (list != null)
{
dataNum = list.Count;
}
Repeater2.DataSource = list;
Repeater2.DataBind();
}
public string LeaveStatu(object obj)
{
string str = "";
if (obj != null)
{
if (int.Parse(obj.ToString()) == 1)
{
str = "用户提交";
}
else if (int.Parse(obj.ToString()) == 0)
{
str = "管理员回复";
}
}
return str;
}
public string ControlSet(object OrderID, object LeavID, object userOrAdmin)
{
if (OrderID == null || LeavID == null || userOrAdmin == null)
return "";
StringBuilder sb = new StringBuilder();
string orderID = "";
int ID = 0;
if (OrderID != null)
orderID = OrderID.ToString();
if (LeavID != null)
ID = int.Parse(LeavID.ToString());
int i = 0;
if (userOrAdmin != null)
i = int.Parse(userOrAdmin.ToString());
if (i == 0)
{
sb.Append("<a href='#' onclick='DeliverDel(" + ID + ")'>删除</a>");
sb.Append("<a href='reLeave.aspx?OrderID=" + orderID + "'>修改</a>");
}
else if (i == 1)
{
sb.Append("<a href='reLeave.aspx?OrderID=" + orderID + "'>回复</a>");
sb.Append("<a href='#' onclick='DeliverDel(" + ID + ")'>删除</a>");
sb.Append("<a href='leaveModfy.aspx?ID=" + ID + "'>修改</a>");
}
return sb.ToString();
}
[AjaxPro.AjaxMethod]
public void ItemDel(int ID)
{
leavBll.Delete(ID);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -