Esempio n. 1
0
        public ActionResult SettingAdd(SettingModel model)
        {
            Setting setting = new Setting
               {
                   Description = model.Description,
                   Facebook = model.Facebook,
                   LinkedIn = model.LinkedIn,
                   SMTPLogin = model.SMTPLogin,
                   SMTPPassword = model.SMTPPassword,
                   SMTPPort = model.SMTPPort,
                   SMTPServer = model.SMTPServer,
                   SMTPSSL = model.SMTPSSL,
                   Title = model.Title,
                   Twitter = model.Twitter,
                   Youtube = model.Youtube
               };

            _settingService.Insert(setting);
            _uow.SaveChanges();

            return RedirectToAction("ListSetting");
        }
Esempio n. 2
0
 /// <summary>
 /// Delete a setting by setting entity.
 /// </summary>
 /// <param name="setting">Setting</param>
 public void Delete(Setting setting)
 {
     _settingRepository.Delete(setting);
 }
Esempio n. 3
0
 /// <summary>
 /// Update a setting.
 /// </summary>
 /// <param name="setting"></param>
 public void Update(Setting setting)
 {
     _settingRepository.Update(setting);
 }
Esempio n. 4
0
 /// <summary>
 /// Insert new setting.
 /// </summary>
 /// <param name="setting"></param>
 public void Insert(Setting setting)
 {
     _settingRepository.Insert(setting);
 }