public ActionResult Create([Bind(Include = "recognitionID,recognitionTitle,recognitionDescription,recognitionDate,userID,valueId")] recognition recognition)
        {
            if (ModelState.IsValid)
            {
                recognition.recognitionID = Guid.NewGuid();
                db.Recognitions.Add(recognition);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.valueId = new SelectList(db.CoreValues, "valueId", "valueName", recognition.valueId);
            ViewBag.userID  = new SelectList(db.UserData, "userID", "fullName", recognition.userID);
            return(View(recognition));
        }
        // GET: recognitions/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            recognition recognition = db.Recognitions.Find(id);

            if (recognition == null)
            {
                return(HttpNotFound());
            }
            return(View(recognition));
        }
        // GET: recognitions/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            recognition recognition = db.recognition.Find(id);

            if (recognition == null)
            {
                return(HttpNotFound());
            }
            return(View(recognition));
        }
        // GET: recognitions/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            recognition recognition = db.recognitions.Find(id);

            if (recognition == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id = new SelectList(db.Profiles, "ID", "firstName", recognition.id);
            return(View(recognition));
        }
        // GET: recognitions/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            recognition recognition = db.Recognitions.Find(id);

            if (recognition == null)
            {
                return(HttpNotFound());
            }
            ViewBag.valueId = new SelectList(db.CoreValues, "valueId", "valueName", recognition.valueId);
            ViewBag.userID  = new SelectList(db.UserData, "userID", "firstName", recognition.userID);
            return(View(recognition));
        }
        // GET: recognitions/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            recognition recognition = db.recognition.Find(id);

            if (recognition == null)
            {
                return(HttpNotFound());
            }
            ViewBag.recognizer = new SelectList(db.userDetails, "ID", "fullName", recognition.recognizer);
            ViewBag.recognizee = new SelectList(db.userDetails, "ID", "fullName", recognition.recognizee);
            return(View(recognition));
        }
        public ActionResult Create([Bind(Include = "recognitionID,recognizer,recognizee,recognitionCoreValue,description, starPoints, dateTime")] recognition recognition)
        {
            if (ModelState.IsValid)
            {
                Guid memberID;
                Guid.TryParse(User.Identity.GetUserId(), out memberID);
                recognition.recognizer = memberID;
                db.recognition.Add(recognition);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.recognizer = new SelectList(db.userDetails, "ID", "fullName", recognition.recognizer);
            ViewBag.recognizee = new SelectList(db.userDetails, "ID", "fullName", recognition.recognizee);
            return(View(recognition));
        }