Ejemplo n.º 1
0
 protected void myGrid_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "del")
     {
         LinkBiz.DeleteLink(Convert.ToInt32(e.CommandArgument));
     }
     PageInit();
 }
Ejemplo n.º 2
0
        protected void DeleteButton_Click(object sender, EventArgs e)
        {
            base.CheckAdminPower("DeleteLink", PowerCheckType.Single);
            string intsForm = RequestHelper.GetIntsForm("SelectID");

            if (intsForm != string.Empty)
            {
                LinkBLL.DeleteLink(intsForm);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("Link"), intsForm);
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl);
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack)
            {
                return;
            }

            CheckAdminPower("ReadLink", PowerCheckType.Single);
            string action = RequestHelper.GetQueryString <string>("Action");

            if (action == "Delete")
            {
                CheckAdminPower("DeleteLink", PowerCheckType.Single);
                string deleteID = RequestHelper.GetQueryString <string>("ID");
                if (deleteID != string.Empty)
                {
                    LinkBLL.DeleteLink(deleteID);
                    AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("Link"), deleteID);
                    ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), "Link.aspx");
                }
            }
            int linkID = RequestHelper.GetQueryString <int>("ID");

            if (action != string.Empty && linkID != int.MinValue)
            {
                CheckAdminPower("UpdateLink", PowerCheckType.Single);
                switch (action)
                {
                case "Up":
                    LinkBLL.ChangeLinkOrder(ChangeAction.Up, linkID);
                    break;

                case "Down":
                    LinkBLL.ChangeLinkOrder(ChangeAction.Down, linkID);
                    break;

                default:
                    break;
                }
                AdminLogBLL.Add(ShopLanguage.ReadLanguage("MoveRecord"), ShopLanguage.ReadLanguage("Link"), linkID);
            }
            classID = RequestHelper.GetQueryString <int>("ClassID");
            if (classID == int.MinValue)
            {
                classID = 1;
            }
            BindControl(LinkBLL.ReadLinkCacheListByClass(classID), RecordList);
        }
Ejemplo n.º 4
0
 public void DeleteLink(int id)
 {
     LinkBLL.DeleteLink(id);
 }