📄 twodomainnameoperation.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.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using Shop.Web.UI;
namespace YXShop.Web.Admin.Shop
{
public partial class TWODomainNameOperation : System.Web.UI.Page
{
BLL.YXShop_Shop B_Shop = new BLL.YXShop_Shop();
BasePage bp = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!PowerTree.PowerPass.isPass("014004004", PowerTree.PowerPanel.PowerType.update))
{
bp = new BasePage();
bp.PageError("对不起,你没有修改域名信息的权限!", "../index.aspx");
}
if (!IsPostBack)
{
if (!string.IsNullOrEmpty(Request.QueryString["ID"]))
{
List<Model.YXShop_Shop> listShop = B_Shop.GetListByColumn("SID", Convert.ToInt32(Request.QueryString["ID"]));
if (listShop.Count > 0)
{
txtShopNo.Text = listShop[0].ShopNum.ToString();
txtTWODomainName.Text = listShop[0].TWODomainName;
ViewState["Attribute"] = listShop[0].Attribute.Substring(0, 10);
rbtUse.Text = listShop[0].Attribute.Split(',')[5];
txtAddDate.Text = listShop[0].AddTime.ToString();
}
else
{
Response.Redirect(Request.UrlReferrer.ToString());
}
}
else { Response.Redirect(Request.UrlReferrer.ToString()); }
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (B_Shop.GetListByColumn("TWODomainName", txtTWODomainName.Text).Count > 0)
{
YXShop.Common.alert.showOnly("二级域名以存在");
return;
}
try
{
int ID = Convert.ToInt32(Request.QueryString["ID"]);
B_Shop.Amend(ID, "TWODomainName", txtTWODomainName.Text);
B_Shop.Amend(ID, "Attribute", ViewState["Attribute"] + rbtUse.Text);
YXShop.Common.alert.showAndGo("修改二级域名成功", "TWODomainName.aspx?page="+Convert.ToInt32(Request.QueryString["page"]));
}
catch
{
YXShop.Common.alert.showOnly("修改二级域名失败");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -