コード例 #1
0
        //
        // GET: /Employee/Create

        public ActionResult Create()
        {
            ViewBag.Designation = DropDownList <Designation> .LoadItems(
                objSourceMastersModel.GetDesignationt(), "DesignationID", "Designation1");

            ViewBag.Department = DropDownList <Department> .LoadItems(
                objSourceMastersModel.GetDepartment(), "DepartmentID", "Department1");

            ViewBag.Location = DropDownList <Location> .LoadItems(
                objSourceMastersModel.GetLocation(), "LocationID", "Location1");

            ViewBag.Country = DropDownList <CountryMaster> .LoadItems(objSourceMastersModel.GetCountry(), "CountryID", "CountryName");

            //ViewBag.Designation = Enum.GetValues(typeof(Designation)).Cast<Designation>().Select(c => new SelectListItem { Text = c.ToString(), Value = c.ToString() });
            return(View());
        }
コード例 #2
0
        //
        // GET: /Designation/

        public ActionResult Index()
        {
            var designation = objSourceMastersModel.GetDesignationt();

            return(View(designation));
        }