Example #1
0
 public ActionResult MailSettings(EMailSetting eMailSetting)
 {
     if (ModelState.IsValid)
     {
         if (permissionUser.SysAdmin == false)
         {
             throw new Exception("Yetkisiz Erişim!");
         }
         _emailSettingsService.UpdateEMailSetting(eMailSetting);
         return(RedirectToAction("Total", "Refectory"));
     }
     return(RedirectToAction("Total", "Refectory"));
 }
Example #2
0
        public ActionResult Add(EMailSetting eMailSetting)
        {
            if (ModelState.IsValid)
            {
                if (permissionUser.SysAdmin == false)
                {
                    throw new Exception("Yetkisiz Erişim!");
                }

                var updatedemail = _emailSettingsService.UpdateEMailSetting(eMailSetting);
                ConfigHelper.SetEmailConfig(updatedemail);
                _accessDatasService.AddOperatorLog(220, user.Kullanici_Adi, eMailSetting.Kayit_No, 0, 0, 0);
                return(RedirectToAction("Add", "Email"));
            }
            return(View(eMailSetting));
        }