Esempio n. 1
0
 /// <summary>
 /// 添加敏感词
 /// </summary>
 /// <param name="word"></param>
 public void addeword(string word)
 {
     try
     {
         Exam.Entity.tb_WordEntity model = new Exam.Entity.tb_WordEntity();
         model.Addtime    = DateTime.Now;
         model.Updatetime = DateTime.Now;
         model.Status     = 1;
         model.UserId     = identity.UserID;
         model.Word       = SqlInject(word);
         int i = Exam.BLL.tb_WordBLL.GetInstance().Insert(model);
         if (i > 0)
         {
             Response.Write(1);
         }
         else
         {
             Response.Write(2);
         }
     }
     catch (Exception ex)
     {
         Response.Write(2);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 删除敏感词
 /// </summary>
 /// <param name="id"></param>
 public void deleteword(int id)
 {
     try
     {
         Exam.Entity.tb_WordEntity model = Exam.BLL.tb_WordBLL.GetInstance().GetAdminSingle(id);
         if (model != null)
         {
             model.Status     = 0;
             model.Updatetime = DateTime.Now;
             Exam.BLL.tb_WordBLL.GetInstance().Update(model);
             Response.Write(1);
         }
         else
         {
             Response.Write(2);
         }
     }
     catch (Exception ex)
     {
         Response.Write(2);
     }
 }