Exemplo n.º 1
0
        //设置操作
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value);

            BLL.link   bll   = new BLL.link();
            Model.link model = bll.GetModel(id);
            switch (e.CommandName.ToLower())
            {
            case "ibtnred":
                if (model.is_red == 1)
                {
                    bll.UpdateField(id, "is_red=0");
                }
                else
                {
                    bll.UpdateField(id, "is_red=1");
                }
                break;
            }
            this.RptBind("id>0" + CombSqlTxt(this.keywords), "sort_id asc,add_time desc");
        }
Exemplo n.º 2
0
 //批量审核
 protected void lbtnUnLock_Click(object sender, EventArgs e)
 {
     BLL.link bll = new BLL.link();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.UpdateField(id, "is_lock=0");
         }
     }
     JscriptMsg("批量审核成功啦!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords), "Success");
 }
Exemplo n.º 3
0
 //批量审核
 protected void lbtnUnLock_Click(object sender, EventArgs e)
 {
     BLL.link bll = new BLL.link();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.UpdateField(id, "is_lock=0");
         }
     }
     JscriptMsg("批量审核成功啦!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords), "Success");
 }
Exemplo n.º 4
0
 //保存排序
 protected void btnSave_Click(object sender, EventArgs e)
 {
     BLL.link bll = new BLL.link();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     JscriptMsg("保存排序成功啦!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords), "Success");
 }
Exemplo n.º 5
0
 //保存排序
 protected void btnSave_Click(object sender, EventArgs e)
 {
     BLL.link bll = new BLL.link();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     JscriptMsg("保存排序成功啦!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords), "Success");
 }
Exemplo n.º 6
0
 //批量审核
 protected void lbtnUnLock_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("plugin_link", DTEnums.ActionEnum.Audit.ToString()); //检查权限
     BLL.link bll = new BLL.link();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.UpdateField(id, "is_lock=0");
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Audit.ToString(), "审核友情链接"); //记录日志
     JscriptMsg("批量审核成功!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords), "Success");
 }
Exemplo n.º 7
0
 //保存排序
 protected void btnSave_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("plugin_link", DTEnums.ActionEnum.Edit.ToString()); //检查权限
     BLL.link bll = new BLL.link();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改友情链接插件排序:"); //记录日志
     JscriptMsg("保存排序成功!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords), "Success");
 }
Exemplo n.º 8
0
 //保存排序
 protected void lbtnSave_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("plugin_link", DTEnums.ActionEnum.Edit.ToString()); //检查权限
     BLL.link bll = new BLL.link();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改友情链接插件排序:"); //记录日志
     JscriptMsg("保存排序成功!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords));
 }
Exemplo n.º 9
0
 //设置操作
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value);
     BLL.link bll = new BLL.link();
     Model.link model = bll.GetModel(id);
     switch (e.CommandName.ToLower())
     {
         case "ibtnred":
             if (model.is_red == 1)
                 bll.UpdateField(id, "is_red=0");
             else
                 bll.UpdateField(id, "is_red=1");
             break;
     }
     this.RptBind("id>0" + CombSqlTxt(this.keywords), "sort_id asc,add_time desc");
 }
Exemplo n.º 10
0
 //批量审核
 protected void lbtnUnLock_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("plugin_link", DTEnums.ActionEnum.Audit.ToString()); //检查权限
     BLL.link bll = new BLL.link();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.UpdateField(id, "is_lock=0");
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Audit.ToString(), "审核友情链接"); //记录日志
     JscriptMsg("批量审核成功!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords));
 }