public ActionResult DeleteConfirmed(int id)
        {
            EnglishTwoSix englishTwoSix = db.EnglishTwoSixs.Find(id);

            db.EnglishTwoSixs.Remove(englishTwoSix);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,Roll,SBA,Final,Total,GPA,Grade")] EnglishTwoSix englishTwoSix)
 {
     if (ModelState.IsValid)
     {
         db.Entry(englishTwoSix).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(englishTwoSix));
 }
        // GET: EnglishTwoSix/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EnglishTwoSix englishTwoSix = db.EnglishTwoSixs.Find(id);

            if (englishTwoSix == null)
            {
                return(HttpNotFound());
            }
            return(View(englishTwoSix));
        }
        public ActionResult Create([Bind(Include = "ID,Roll,SBA,Final,Total,GPA,Grade")] EnglishTwoSix englishTwoSix)
        {
            if (ModelState.IsValid)
            {
                englishTwoSix.Total = englishTwoSix.SBA + englishTwoSix.Final;
                if (englishTwoSix.Total >= 80)
                {
                    englishTwoSix.GPA = 4.00;
                }
                else if (englishTwoSix.Total >= 75 && englishTwoSix.Total < 80)
                {
                    englishTwoSix.GPA = 3.75;
                }
                else if (englishTwoSix.Total >= 70 && englishTwoSix.Total < 75)
                {
                    englishTwoSix.GPA = 3.50;
                }
                else if (englishTwoSix.Total >= 65 && englishTwoSix.Total < 70)
                {
                    englishTwoSix.GPA = 3.25;
                }
                else if (englishTwoSix.Total >= 60 && englishTwoSix.Total < 65)
                {
                    englishTwoSix.GPA = 3.00;
                }
                else if (englishTwoSix.Total >= 55 && englishTwoSix.Total < 60)
                {
                    englishTwoSix.GPA = 2.75;
                }
                else if (englishTwoSix.Total >= 50 && englishTwoSix.Total < 55)
                {
                    englishTwoSix.GPA = 2.50;
                }
                else if (englishTwoSix.Total >= 45 && englishTwoSix.Total < 50)
                {
                    englishTwoSix.GPA = 2.25;
                }
                else if (englishTwoSix.Total >= 40 && englishTwoSix.Total < 45)
                {
                    englishTwoSix.GPA = 2.00;
                }
                else if (englishTwoSix.Total < 40)
                {
                    englishTwoSix.GPA = 0.00;
                }

                if (englishTwoSix.Total >= 80)
                {
                    englishTwoSix.Grade = "A+";
                }
                else if (englishTwoSix.Total >= 75 && englishTwoSix.Total < 80)
                {
                    englishTwoSix.Grade = "A";
                }
                else if (englishTwoSix.Total >= 70 && englishTwoSix.Total < 75)
                {
                    englishTwoSix.Grade = "A-";
                }
                else if (englishTwoSix.Total >= 65 && englishTwoSix.Total < 70)
                {
                    englishTwoSix.Grade = "B+";
                }
                else if (englishTwoSix.Total >= 60 && englishTwoSix.Total < 65)
                {
                    englishTwoSix.Grade = "B";
                }
                else if (englishTwoSix.Total >= 55 && englishTwoSix.Total < 60)
                {
                    englishTwoSix.Grade = "B-";
                }
                else if (englishTwoSix.Total >= 50 && englishTwoSix.Total < 55)
                {
                    englishTwoSix.Grade = "C+";
                }
                else if (englishTwoSix.Total >= 45 && englishTwoSix.Total < 50)
                {
                    englishTwoSix.Grade = "C";
                }
                else if (englishTwoSix.Total >= 40 && englishTwoSix.Total < 45)
                {
                    englishTwoSix.Grade = "D";
                }
                else if (englishTwoSix.Total < 40)
                {
                    englishTwoSix.Grade = "F";
                }
                db.EnglishTwoSixs.Add(englishTwoSix);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(englishTwoSix));
        }