public ActionResult List(int electiveOrgId) { using (var db = new XkSystem.Models.DbContext()) { var vm = new Models.ElectiveOrgSchedule.List(); vm.WeekList = Basis.Controllers.WeekController.SelectList(); vm.PeriodList = Basis.Controllers.PeriodController.SelectList(); vm.ElectiveOrgScheduleList = (from p in db.Table <Entity.tbElectiveOrgSchedule>() where p.tbElectiveOrg.Id == electiveOrgId orderby p.No select new Dto.ElectiveOrgSchedule.List { Id = p.Id, ElectiveOrgId = p.tbElectiveOrg.Id, ElectiveOrgName = p.tbElectiveOrg.OrgName, PeriodId = p.tbPeriod.Id, PeriodName = p.tbPeriod.PeriodName, WeekId = p.tbWeek.Id, WeekName = p.tbWeek.WeekName }).ToList(); return(PartialView(vm)); } }
public ActionResult Edit(int id = 0) { var vm = new Models.ElectiveOrgSchedule.List(); return(View(vm)); }
public ActionResult List(Models.ElectiveOrgSchedule.List vm) { return(Code.MvcHelper.Post(null, Url.Action("List", new { electiveOrgId = vm.ElectiveOrgId }))); }