Example #1
0
        // GET: Courses
        public ActionResult Courses()
        {
            BussinessLayer.Sdo_ChatEntities db = new BussinessLayer.Sdo_ChatEntities();
            var courses = db.CourseDetails.ToList();

            return(View(courses));
        }
Example #2
0
        public ActionResult Index()
        {
            BussinessLayer.Sdo_ChatEntities db = new BussinessLayer.Sdo_ChatEntities();
            var users = db.UserProfiles.ToList();

            return(View(users));
        }
Example #3
0
        public ActionResult AddUser(string name, string email, string phone, string message)
        {
            BussinessLayer.Sdo_ChatEntities db = new BussinessLayer.Sdo_ChatEntities();
            if (!ModelState.IsValid)
            {
                return(View());
            }
            var user = new BussinessLayer.ManageUser()
            {
                Username      = name,
                Email         = email,
                Password      = phone,
                OperationUnit = message
            };

            db.ManageUsers.Add(user);
            db.SaveChanges();
            ViewBag.Status = "Your Request has been received. We will get back you soon!";
            return(View());
        }