Esempio n. 1
0
        //
        // GET: /Home/
        public ActionResult Index()
        {
            Company company = new Company("Pragim");

            ViewBag.Departments = new SelectList(company.Departments, "Id", "Name");
            ViewBag.CompanyName = company.CompanyName;

            return View();
        }
Esempio n. 2
0
 public string Index(Company company)
 {
     if (string.IsNullOrEmpty(company.SelectedDepartment))
     {
         return "You did not select any department";
     }
     else
     {
         return "You selected department with ID = " + company.SelectedDepartment;
     }
 }
Esempio n. 3
0
 public ActionResult Index()
 {
     Company company = new Company();
     return View(company);
 }
Esempio n. 4
0
 public ActionResult Index1()
 {
     Company company = new Company("Pragim");
     return View(company);
 }