public ActionResult SectionIndex() { @ViewBag.Main = "List"; @ViewBag.Sub = "Sections"; BasicContants.StoredProcedure = "GetSections"; IEnumerable <SectionsModel> model = _sectionRep.Get(); return(View(model)); }
public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var section = _sectionsRepository.Get((int)id); if (section == null) { return(HttpNotFound()); } return(View(section)); }
public void FillData() { BasicRepository _basic = new BasicRepository(); BasicContants.StoredProcedure = "GetGender"; Genders = _basic.Get(); GenderList = Genders.ToGenderSelectListItems(GenderID); BasicContants.StoredProcedure = "GetStudentType"; Students = _basic.Get(); StudentList = Students.ToStudentTypeSelectListItems(StudentTypeID); SectionsRepository _section = new SectionsRepository(); BasicContants.StoredProcedure = "GetFullSectionName"; Sections = _section.Get(); SectionList = Sections.ToSectionSelectListItems(SectionID); ParentRepository _parent = new ParentRepository(); Parents = _parent.Get(); ParentList = Parents.ToParentSelectListItems(ParentID); TransportRepository _transport = new TransportRepository(); Transports = _transport.Get(); TransportList = Transports.ToTransportSelectListItems(TransportID); }
public virtual Section Get(int id) { return(_sectionsRangeRepository.Get(id)); }