コード例 #1
0
ファイル: DingYue.cs プロジェクト: ngochoanhbr/dahuco
 protected void lnk_Delete_Click(object sender, System.EventArgs e)
 {
     if (!base.IsAuthorizedOp(ActionType.Delete.ToString()))
     {
         base.ShowAjaxMsg(this.UpdatePanel1, "Không có thẩm quyền");
     }
     else
     {
         int            @int     = WebUtils.GetInt((sender as LinkButton).CommandArgument);
         DingYueLogInfo dataById = DingYueLog.GetDataById(@int);
         if (dataById == null)
         {
             base.ShowAjaxMsg(this.UpdatePanel1, "Không tìm thấy dữ liệu, dữ liệu không tồn tại hoặc đã bị xóa ");
         }
         else if (DingYueLog.Delete(@int))
         {
             this.BindData();
             PageBase.log.AddEvent(base.LoginAccount.AccountName, string.Concat(new string[]
             {
                 "删除订阅日志[",
                 dataById.MailTitle,
                 "(",
                 dataById.AutoTimeStamp.ToString(),
                 ")]成功"
             }));
             base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thành công");
         }
         else
         {
             base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thất bại");
         }
     }
 }
コード例 #2
0
ファイル: DingYue.cs プロジェクト: ngochoanhbr/dahuco
        private void BindData()
        {
            int    recordCount = 0;
            int    num         = 0;
            string strSort     = " AutoID DESC ";

            this.SinGooPager1.PageSize = WebUtils.GetInt(this.drpPageSize.SelectedValue);
            this.Repeater1.DataSource  = DingYueLog.GetPagerList(this.GetCondition(), strSort, this.SinGooPager1.PageIndex, this.SinGooPager1.PageSize, ref recordCount, ref num);
            this.Repeater1.DataBind();
            this.SinGooPager1.RecordCount = recordCount;
        }
コード例 #3
0
ファイル: SendDingYueMail.cs プロジェクト: ngochoanhbr/dahuco
 protected void btnok_Click(object sender, System.EventArgs e)
 {
     if (!base.IsAuthorizedOp("SendMail"))
     {
         base.ShowMsg("Không có thẩm quyền");
     }
     else
     {
         DingYueLogInfo dingYueLogInfo = new DingYueLogInfo();
         dingYueLogInfo.SendEmail = PageBase.config.ServMailAccount;
         dingYueLogInfo.MailTitle = WebUtils.GetString(this.TextBox2.Text);
         dingYueLogInfo.MailBody  = WebUtils.GetString(this.TextBox3.Text);
         if (string.IsNullOrEmpty(dingYueLogInfo.SendEmail))
         {
             base.ShowMsg("没有可用的服务邮箱");
         }
         else if (string.IsNullOrEmpty(dingYueLogInfo.MailTitle))
         {
             base.ShowMsg("邮件标题不能为空");
         }
         else if (string.IsNullOrEmpty(dingYueLogInfo.MailBody))
         {
             base.ShowMsg("邮件内容不能为空");
         }
         else
         {
             dingYueLogInfo.SendCount     = SendDingYueMail.SendMail(dingYueLogInfo.MailTitle, dingYueLogInfo.MailBody);
             dingYueLogInfo.Lang          = base.cultureLang;
             dingYueLogInfo.AutoTimeStamp = System.DateTime.Now;
             if (DingYueLog.Add(dingYueLogInfo) > 0)
             {
                 PageBase.log.AddEvent(base.LoginAccount.AccountName, "发送订阅邮件[" + dingYueLogInfo.MailTitle + "] thành công");
                 base.ShowMsg("发送邮件成功");
             }
             else
             {
                 base.ShowMsg("发送邮件失败");
             }
         }
     }
 }
コード例 #4
0
ファイル: DingYue.cs プロジェクト: ngochoanhbr/dahuco
 protected void btn_DelBat_Click(object sender, System.EventArgs e)
 {
     if (!base.IsAuthorizedOp(ActionType.Delete.ToString()))
     {
         base.ShowAjaxMsg(this.UpdatePanel1, "Không có thẩm quyền");
     }
     else
     {
         string repeaterCheckIDs = base.GetRepeaterCheckIDs(this.Repeater1, "chk", "autoid");
         if (!string.IsNullOrEmpty(repeaterCheckIDs))
         {
             if (DingYueLog.Delete(repeaterCheckIDs))
             {
                 this.BindData();
                 PageBase.log.AddEvent(base.LoginAccount.AccountName, "批量删除订阅日志成功");
                 base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thành công");
             }
             else
             {
                 base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thất bại");
             }
         }
     }
 }