public ActionResult AddStudent(scholarshipdetail model)
        {
            var checkId = db.scholarshipdetails.Where(x => x.student_Id == model.student_Id).FirstOrDefault();

            if (checkId == null && Session["userid"] != null)
            {
                if (ModelState.IsValid)
                {
                    model.approvedbyScholarshipProvider = "Waiting For Approval";
                    model.approvedbyInstitution         = "Waiting For Approval";
                    db.scholarshipdetails.Add(model);

                    db.SaveChanges();
                    ViewBag.SuccessMessage = "Your Request to apply for Scholarship is submitted successfully";
                    return(View("Student"));
                }
            }
            else
            {
                ViewBag.Message = "You have already made a Request for Scholarship wait for confirmation by Scholarship Provider";
                return(View());
            }
            ModelState.Clear();
            return(RedirectToAction("Student"));
        }
 public ActionResult Edit([Bind(Include = "student_Id,Marks,Grade,DemoCourse,College,approvedbyScholarshipProvider,approvedbyInstitution")] scholarshipdetail scholarshipdetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(scholarshipdetail).State       = EntityState.Modified;
         scholarshipdetail.approvedbyInstitution = "Waiting for Approval";
         db.SaveChanges();
         return(RedirectToAction("ViewScholarshipRequest"));
     }
     return(View(scholarshipdetail));
 }