Пример #1
0
        public ActionResult MailSetting(MailSetting model, string txtpassword)
        {
            var record = MailManager.GetMailSettings();

            if (record == null)
            {
                ViewBag.nullsetting    = true;
                model.Password         = txtpassword;
                ViewBag.ProcessMessage = MailManager.AddSetting(model);
                return(View(model));
            }
            else
            {
                if (!string.IsNullOrEmpty(txtpassword))
                {
                    model.Password = txtpassword;
                }

                ViewBag.nullsetting    = false;
                model.MailSettingId    = record.MailSettingId;
                ViewBag.ProcessMessage = MailManager.EditSetting(model);
            }
            ////            record.TypeId = Convert.ToInt32(EnumInstituionalTypes.Misyon);
            //ViewBag.ProcessMessage = MailManager.AddMailUsers(model);
            //ModelState.Clear();
            return(View());
        }