public ActionResult DiscountDetails(int stid, int branchid, int classid, int sessionid, int cateid, int sectionid, int Termid, int feevtype) { SMSContext sMSContext = new SMSContext(); Discounttbl discounttbl = new Discounttbl(); int stids = stid; var getid = sMSContext.discounttbls.ToList().Where (x => x.Stdid == stids).ToList(); if (getid.Count() == 0) { FeeVoucherTypeservice feeVoucherTypeservice = new FeeVoucherTypeservice(); SMSContext _context = new SMSContext(); ViewBag.authordata = AuthorityDetailTblservice.getAuthorityDetailTbl().ToList(); ViewBag.getvoucher = feeVoucherTypeservice.getFeeVoucherType().ToList(); return(View()); } else { return(RedirectToAction("AlreadyDiscount")); } }
public ActionResult StudentHeadDiscountList() { FeeVoucherTypeservice feeVoucherTypeservice = new FeeVoucherTypeservice(); SubHead3Codeservice subHead3Codeservice = new SubHead3Codeservice(); SMSContext sMSContext = new SMSContext(); var list = from n in sMSContext.discounttbls.ToList() join db in termservice.getTerm() on n.tmId equals db.id join feev in feeVoucherTypeservice.getFeeVoucherType() on n.vocid equals feev.FeeVoucherTypeCode join sub in subHead3Codeservice.getSubHead3Code() on n.headcode equals sub.SubHeadCode3 join stud in studentservice.getstudent() on n.Stdid equals stud.ID select new discountviewVm { discounttbl = n, term = db, FeeVoucherType = feev, Head3Code = sub, student = stud }; return(View(list)); }