Ejemplo n.º 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);
        }
    }
Ejemplo n.º 2
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);
     }
 }