Esempio n. 1
0
 private void AddEmailsHead(int count)
 {
     for (var i = 0; i < count; i++)
     {
         Emails.Insert(0, CreateEmail());
     }
 }
Esempio n. 2
0
        public ActionResult Edit(Email email)
        {
            try
            {
                email.LastUpdate = DateTime.Now;

                ViewBag.Success = true;

                if (email.ID == -1)
                {
                    Emails.Insert(email);

                    UserNotifications.Send(UserID, String.Format("جدید - ایمیل '{0}'", email.EmailAddress), "/Admin/Emails/Edit/" + email.ID, NotificationType.Success);
                    email = new Email();
                }
                else
                {
                    Emails.Update(email);
                }
            }
            catch (Exception ex)
            {
                SetErrors(ex);
            }

            return(ClearView(email));
        }