コード例 #1
0
ファイル: AutoReply.cs プロジェクト: llenroc/kangaroo
 private void repreplykey_ItemCommand(object sender, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "del")
     {
         System.Collections.Generic.IList <ReplyInfo> replyInfo = WeiboHelper.GetReplyInfo(int.Parse(e.CommandArgument.ToString()));
         if (replyInfo.Count > 0)
         {
             this.ShowMsg("关键词中有回复信息,请先删除回复信息!", false);
             return;
         }
         if (WeiboHelper.DeleteReplyKeyInfo(int.Parse(e.CommandArgument.ToString())))
         {
             this.ShowMsg("关键词删除成功!", true);
             this.bind();
             return;
         }
         this.ShowMsg("关键词删除失败!", false);
     }
 }
コード例 #2
0
 private void repreplykey_ItemCommand(object sender, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "del")
     {
         if (WeiboHelper.GetReplyInfo(int.Parse(e.CommandArgument.ToString())).Count > 0)
         {
             this.ShowMsg("关键词中有回复信息,请先删除回复信息!", false);
         }
         else if (WeiboHelper.DeleteReplyKeyInfo(int.Parse(e.CommandArgument.ToString())))
         {
             this.ShowMsg("关键词删除成功!", true);
             this.bind();
         }
         else
         {
             this.ShowMsg("关键词删除失败!", false);
         }
     }
 }