Ejemplo n.º 1
0
 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");
         }
     }
 }
Ejemplo n.º 2
0
        public static int Add(DingYueLogInfo entity)
        {
            int result;

            if (entity == null)
            {
                result = 0;
            }
            else
            {
                result = BizBase.dbo.InsertModel <DingYueLogInfo>(entity);
            }
            return(result);
        }
Ejemplo n.º 3
0
 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("发送邮件失败");
             }
         }
     }
 }
Ejemplo n.º 4
0
 public static bool Update(DingYueLogInfo entity)
 {
     return(entity != null && BizBase.dbo.UpdateModel <DingYueLogInfo>(entity));
 }