//
 // GET: /DistrictPlan/
 public ViewResult Index()
 {
     var model = new DistrictPlan();
     this.LoadViewBag(model);
     return View(model);
 }
        private void LoadViewBag(DistrictPlan model)
        {
            model.DistrictPlanCollectionList = GetProjectPlansSummary();

            //model.ProjectPlansList = GetProjectPlans();

            ViewBag.ContractId = new SelectList(GetContracts(), "Id", "Name");

            IList<Item> ddlYear = new List<Item>();
            for (int i = 0; i < 10; i++)
            {
                var year = DateTime.Now.AddYears(i).Year;
                ddlYear.Add(new Item() { Id = year, Text = year.ToString() });
            }
            ViewBag.Years = new SelectList(ddlYear, "Id", "Text");
            ViewBag.BidTypeId = new SelectList(this.GetData(typeof(BidType)), "Id", "Text");
            ViewBag.BidModeId = new SelectList(this.GetData(typeof(BidMode)), "Id", "Text");
            ViewBag.ContractCategoryId = new SelectList(this.GetData(typeof(ContractCategory)), "Id", "Text");
            ViewBag.ContractTypeId = new SelectList(this.GetData(typeof(ContractType)), "Id", "Text");
            ViewBag.ContractRelationId = new SelectList(this.GetData(typeof(ContractRelation)), "Id", "Text");
            ViewBag.DepartmentId = new SelectList(this.GetData(typeof(Dept)), "Id", "Text");
            ViewBag.EmployeeId = new SelectList(this.GetData(typeof(EmployeeName)), "Id", "Text");
        }