Ejemplo n.º 1
0
 public ActionResult ForgetPassword(NailShop.Business.Model.ModelWeb.ForgetPassword model)
 {
     string Password = GeneratePassword();
         ICustomer cls = new CustomerBO();
         if (cls.ForgetPassword(model.Email, Password))
         {
             string body = string.Format(Resources.EmailTemplate.ForgetPasswordBody, model.Email, Password);
             this.SendEmailMessage(model.Email, Resources.EmailTemplate.ForgetPasswordSubject, body);
             ViewBag.Message = Resources.ChangePassword.msgSendEmailSucess;
         }
         else
             ViewBag.Message = Resources.ChangePassword.msgNoteError;
         return View(model);
 }
Ejemplo n.º 2
0
        public ActionResult Contact(NailShop.DataAccess.Contact model)
        {
            IContact _contact = new ContactBO();
                if (model != null)
                {
                    model.CreatedDate = DateTime.Now;
                    model.SiteID = _session.SiteID;
                    if (_contact.Add(model))
                    {
                        string body = string.Format(Resources.EmailTemplate.feedbackBody, model.UserName);
                        this.SendEmailMessage(model.Email, Resources.EmailTemplate.feedbackSubject, Resources.EmailTemplate.feedbackBody);

                        body = string.Format(Resources.EmailTemplate.fromBody, model.UserName, model.Email, model.Title, model.Content);
                        this.SendEmailMessage(model.Email, Resources.EmailTemplate.fromSubject, body);

                        this.ModelState.Clear();
                        model = new Contact();
                    }
                }
                return View(model);
        }