Пример #1
0
 public int ContactUs(ContactUsDetailsModal contactUsDetailsModal)
 {
     using (var context = new INVENTORYEntities())
     {
         CONTACTUS ContactUs = new CONTACTUS();
         ContactUs.FNAME  = contactUsDetailsModal.FirstName;
         ContactUs.LNAME  = contactUsDetailsModal.LastName;
         ContactUs.EMAIL  = contactUsDetailsModal.Email;
         ContactUs.MOBILE = contactUsDetailsModal.Mobile;
         ContactUs.REMARK = contactUsDetailsModal.Description;
         context.CONTACTUS.Add(ContactUs);
         context.SaveChanges();
         return(ContactUs.ID);
     }
 }
Пример #2
0
        public ActionResult Contact(ContactUsDetailsModal contactUsDetails)
        {
            var result = "";

            if (ModelState.IsValid)
            {
                int UserId = repositories.ContactUs(contactUsDetails);
                if (UserId > 0)
                {
                    ModelState.Clear();

                    result = "Registration Successful";
                }
            }

            return(Json(new { result = result }, JsonRequestBehavior.AllowGet));
        }