Пример #1
0
        public JsonResult Send(string name, string mobile, string address, string email, string content)
        {
            var feedback = new Feedback();

            feedback.Name        = name;
            feedback.Email       = email;
            feedback.CreatedDate = DateTime.Now;
            feedback.Phone       = mobile;
            feedback.Content     = content;
            feedback.Address     = address;

            var id = new getcontact().InsertFeedBack(feedback);

            if (id > 0)
            {
                return(Json(new
                {
                    status = true
                }));
                //send mail
            }

            else
            {
                return(Json(new
                {
                    status = false
                }));
            }
        }
Пример #2
0
        // GET: Contact
        public ActionResult Index()
        {
            var model = new getcontact().listcontact();

            return(View(model));
        }