Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Financeofstudent financeofstudent = db.Financeofstudents.Find(id);

            db.Financeofstudents.Remove(financeofstudent);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public ActionResult Create([Bind(Include = "id,UserId,batch_code,debit,credit,balance,lastTrunsaction")] Financeofstudent financeofstudent)
        {
            if (ModelState.IsValid)
            {
                db.Financeofstudents.Add(financeofstudent);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.batch_code = new SelectList(db.Batches, "batch_code", "name", financeofstudent.batch_code);
            ViewBag.UserId     = new SelectList(db.Users, "UserId", "password", financeofstudent.UserId);
            return(View(financeofstudent));
        }
Beispiel #3
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Financeofstudent financeofstudent = db.Financeofstudents.Find(id);

            if (financeofstudent == null)
            {
                return(HttpNotFound());
            }
            ViewBag.batch_code = new SelectList(db.Batches, "batch_code", "name", financeofstudent.batch_code);
            ViewBag.UserId     = new SelectList(db.Users, "UserId", "password", financeofstudent.UserId);
            return(View(financeofstudent));
        }
Beispiel #4
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Financeofstudent financeofstudent = db.Financeofstudents.Find(id);

            if (financeofstudent == null)
            {
                return(HttpNotFound());
            }

            return(View(financeofstudent));
        }