📄 presentprojectmanage.aspx.cs
字号:
namespace PowerEasy.WebSite.Admin.Shop
{
using PowerEasy.Components;
using PowerEasy.Controls;
using PowerEasy.Model.Shop;
using PowerEasy.Shop;
using PowerEasy.Web.UI;
using System;
using System.Text;
using System.Web.UI.WebControls;
public class PresentProjectManage : AdminPage
{
protected ExtendedGridView GdvPresentProjectList;
protected Label LblMsg;
protected ObjectDataSource OdsPresentProjectList;
protected ExtendedSiteMapPath SmpNavigator;
protected void GdvPresentProjectList_RowCommand(object sender, CommandEventArgs e)
{
string commandName = e.CommandName;
if (commandName != null)
{
if (!(commandName == "Locked"))
{
if (commandName == "UnLocked")
{
if (!PresentProject.Locked(Convert.ToInt32(e.CommandArgument), false))
{
AdminPage.WriteErrMsg("启用促销方案数据失败");
}
}
else if (commandName == "Delete")
{
}
}
else if (!PresentProject.Locked(Convert.ToInt32(e.CommandArgument), true))
{
AdminPage.WriteErrMsg("禁用促销方案数据失败");
}
}
this.GdvPresentProjectList.DataBind();
}
protected void GdvPresentProjectList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
PresentProjectInfo dataItem = (PresentProjectInfo) e.Row.DataItem;
StringBuilder builder = new StringBuilder();
if (!string.IsNullOrEmpty(dataItem.PresentContent))
{
string presentContent = dataItem.PresentContent;
if (presentContent.IndexOf("1") != -1)
{
builder.Append("可以以" + dataItem.Price.ToString("0.00") + "元超值换购礼品 ");
}
if (presentContent.IndexOf("2") != -1)
{
builder.Append("返还" + dataItem.Cash.ToString("0.00") + "元现金券 ");
}
if (presentContent.IndexOf("3") != -1)
{
builder.Append("得到" + dataItem.PresentExp + "分积分 ");
}
if (presentContent.IndexOf("4") != -1)
{
builder.Append(string.Concat(new object[] { "得到", dataItem.PresentPoint, SiteConfig.UserConfig.PointUnit, SiteConfig.UserConfig.PointName }));
}
e.Row.Cells[4].Text = builder.ToString();
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -