Ejemplo n.º 1
0
        public bool SaveRvsp(RvspModel rvsp)
        {
            if (rvsp == null)
            {
                return(false);
            }

            if (rvsp.Attending == false)
            {
                rvsp.Comment        = " - ";
                rvsp.FoodInfo       = " - ";
                rvsp.Accommondation = " - ";
                rvsp.NumberOfNights = " - ";
            }

            try
            {
                _db.RvspResponses.Add(rvsp);
                _db.SaveChanges();
            }
            catch (Exception e)
            {
                return(false);
            }
            _smtp.SendMail(rvsp);
            return(true);
        }