Example #1
0
    protected void btnOk_ServerClick(object sender, EventArgs e)
    {
        XYECOM.Model.FiltrateKeyWordInfo efkw = new XYECOM.Model.FiltrateKeyWordInfo();
        XYECOM.Business.FiltrateKeyWord fkw = new XYECOM.Business.FiltrateKeyWord();
        XYECOM.Business.Log l = new XYECOM.Business.Log();
        XYECOM.Model.LogInfo el = new XYECOM.Model.LogInfo();
        efkw.FKW_Name = this.txtName.Text;
        XYECOM.Model.AdminInfo ea = new XYECOM.Model.AdminInfo();
        XYECOM.Business.Admin ad = new XYECOM.Business.Admin();
        int err = 0;
        string str = this.txtName.Text.Trim();
        string[] st = str.Split(',');
        for (int i = 0; i < st.Length; i++)
        {
            efkw.FKW_Name = st[i].ToString();
            err = fkw.Insert(efkw);
        }
        if (err == -1)
        {
            el.L_Title = "过滤字管理";
            el.L_Content = "添加过滤字信息";
            el.L_MF = "系统信息设置";

            {
                el.UM_ID = AdminId;
            }
            l.Insert(el);
            Alert("该记录已存在!请重新输入信息!", url);
        }
        else if (err == -2)
        {
            el.L_Title = "过滤字管理";
            el.L_Content = "该记录已存在!请重新输入信息";
            el.L_MF = "系统信息设置";

            {
                el.UM_ID = AdminId;
            }
            Alert("添加失败!", url);
        }
        else
        {
            el.L_Title = "过滤字管理";
            el.L_Content = "添加过滤字信息成功";
            el.L_MF = "系统信息设置";

            {
                el.UM_ID = AdminId;
            }
            l.Insert(el);
            Alert("添加成功!", url);
        }
    }
Example #2
0
    protected void btndelete_Click(object sender, EventArgs e)
    {
        string ids = "";
        foreach (GridViewRow row in this.gvlist.Rows)
        {
            if (((CheckBox)(row.FindControl("chkExport"))).Checked == true)
                ids += "," + this.gvlist.DataKeys[row.DataItemIndex].Value.ToString();
        }
        if (ids.IndexOf(",") == 0)
            ids = ids.Substring(1);

        XYECOM.Business.FiltrateKeyWord fkw = new XYECOM.Business.FiltrateKeyWord();
        int err = 0;
        err = fkw.Deletes(ids);
        if (err == -2)
        {
            Alert("删除失败!", url);
            this.ClientScript.RegisterClientScriptBlock(GetType(), "01", "<script>alertmsg(\"\",\"" + url + "\")</script>");
        }
        else
        {
            Alert("删除成功!", url);
        }
    }
Example #3
0
 protected void gvlist_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "up")
     {
         FiltrateKeyWord fkw = new FiltrateKeyWord();
         this.key.Value = "2";
         this.va.Value = gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString();
         XYECOM.Model.FiltrateKeyWordInfo Info = fkw.GetItem(Convert.ToInt32(gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString()));
         if (null != Info)
         {
             this.TextBox1.Text = Info.FKW_Name;
         }
     }
 }
Example #4
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     XYECOM.Model.FiltrateKeyWordInfo efkw = new XYECOM.Model.FiltrateKeyWordInfo();
     XYECOM.Business.FiltrateKeyWord fkw = new XYECOM.Business.FiltrateKeyWord();
     efkw.FKW_ID = Convert.ToInt32(this.va.Value);
     efkw.FKW_Name = this.TextBox1.Text;
     int i = 0;
     i = fkw.Update(efkw);
     if (i >= 0)
     {
         Alert("修改成功!", url);
     }
     else
     {
         Alert("修改失败!", url);
     }
 }