예제 #1
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            EmailContentInfo emailContent = new EmailContentInfo();

            emailContent.Key          = RequestHelper.GetQueryString <string>("Key");
            emailContent.IsSystem     = RequestHelper.GetQueryString <int>("IsSystem");
            emailContent.EmailTitle   = this.EmailTitle.Text;
            emailContent.EmailContent = this.EmailContent.Value;
            string alertMessage = ShopLanguage.ReadLanguage("AddOK");

            if (emailContent.Key == string.Empty)
            {
                emailContent.Key = Guid.NewGuid().ToString();
                base.CheckAdminPower("AddEmailContent", PowerCheckType.Single);
                EmailContentHelper.AddEmailContent(emailContent);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("EmailContent"), emailContent.Key);
            }
            else
            {
                base.CheckAdminPower("UpdateEmailContent", PowerCheckType.Single);
                EmailContentHelper.UpdateEmailContent(emailContent);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("EmailContent"), emailContent.Key);
                alertMessage = ShopLanguage.ReadLanguage("UpdateOK");
            }
            AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl);
        }