Exemplo n.º 1
0
        public ActionResult Create([Bind(Include = "faqid,Question,Answer")] FAQ fAQ)
        {
            if (ModelState.IsValid)
            {
                db.FAQs.Add(fAQ);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(fAQ));
        }
Exemplo n.º 2
0
        public ActionResult Create([Bind(Include = "UserId,StarRating,ResolutionStartTime,ResolutionEndTime,Date,Id")] Report report)
        {
            if (ModelState.IsValid)
            {
                db.Reports.Add(report);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.UserId = new SelectList(db.Logins, "UserId", "UserName", report.UserId);
            return(View(report));
        }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,FirstName,LastName,Address,DOB,ManagerId,UserId,Role")] Employee employee)
        {
            if (ModelState.IsValid)
            {
                db.Employees.Add(employee);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.ManagerId = new SelectList(db.Employees, "Id", "FirstName", employee.ManagerId);
            ViewBag.UserId    = new SelectList(db.Logins, "UserId", "UserName", employee.UserId);
            return(View(employee));
        }
Exemplo n.º 4
0
        public void SaveFeedback([Bind(Include = "UserId,StarRating,ResolutionStartTime,ResolutionEndTime,Date,ID")] Report report)
        {
            EERTEntities2 db = new EERTEntities2();

            db.Reports.Add(report);
            db.SaveChanges();
        }
Exemplo n.º 5
0
 public void Create([Bind(Include = "UserId, Message")] CustomerChat chat)
 {
     db.CustomerChats.Add(chat);
     db.SaveChanges();
 }
Exemplo n.º 6
0
 public ActionResult sync([Bind(Include = "TempId,UserId, Message")] CustomerChat chat)
 {
     db.CustomerChats.Add(chat);
     db.SaveChanges();
     return(View());
 }