public async Task <ActionResult> DeleteConfirmed(Guid id)
        {
            StudentUniversityRequest studentUniversityRequest = await db.StudentUniversityRequest.FindAsync(id);

            db.StudentUniversityRequest.Remove(studentUniversityRequest);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "ID,StudentRequestID,UniversityDepartmentID,DateTime,IsDeleted")] StudentUniversityRequest studentUniversityRequest)
        {
            if (ModelState.IsValid)
            {
                db.Entry(studentUniversityRequest).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.StudentRequestID       = new SelectList(db.StudentRequest, "ID", "Name", studentUniversityRequest.StudentRequestID);
            ViewBag.UniversityDepartmentID = new SelectList(db.UniversityDepartment, "ID", "ID", studentUniversityRequest.UniversityDepartmentID);
            return(View(studentUniversityRequest));
        }
        // GET: StudentUniversityRequests/Details/5
        public async Task <ActionResult> Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StudentUniversityRequest studentUniversityRequest = await db.StudentUniversityRequest.FindAsync(id);

            if (studentUniversityRequest == null)
            {
                return(HttpNotFound());
            }
            return(View(studentUniversityRequest));
        }
        public async Task <ActionResult> Create([Bind(Include = "ID,StudentRequestID,UniversityDepartmentID,DateTime,IsDeleted")] StudentUniversityRequest studentUniversityRequest)
        {
            if (ModelState.IsValid)
            {
                studentUniversityRequest.ID = Guid.NewGuid();
                db.StudentUniversityRequest.Add(studentUniversityRequest);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            ViewBag.StudentRequestID       = new SelectList(db.StudentRequest, "ID", "Name", studentUniversityRequest.StudentRequestID);
            ViewBag.UniversityDepartmentID = new SelectList(db.UniversityDepartment, "ID", "ID", studentUniversityRequest.UniversityDepartmentID);
            return(View(studentUniversityRequest));
        }
        // GET: StudentUniversityRequests/Edit/5
        public async Task <ActionResult> Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StudentUniversityRequest studentUniversityRequest = await db.StudentUniversityRequest.FindAsync(id);

            if (studentUniversityRequest == null)
            {
                return(HttpNotFound());
            }
            ViewBag.StudentRequestID       = new SelectList(db.StudentRequest, "ID", "Name", studentUniversityRequest.StudentRequestID);
            ViewBag.UniversityDepartmentID = new SelectList(db.UniversityDepartment, "ID", "ID", studentUniversityRequest.UniversityDepartmentID);
            return(View(studentUniversityRequest));
        }