예제 #1
0
        public ActionResult AddEmp(String Name, double Salary, String Dept)
        {
            localhost.MVC3WebbyStuff eMP = new localhost.MVC3WebbyStuff();
            int ID = eMP.AddEmployee(Name, Salary, Dept);

            return(RedirectToAction("getEmp", new { id = ID }));
        }
예제 #2
0
        public ActionResult AddMgr(String Name, double Salary, String Dept, int Reports, double BonPerRept)
        {
            localhost.MVC3WebbyStuff eMP = new localhost.MVC3WebbyStuff();
            int ID = eMP.AddEmployee(Name, Salary, Dept);

            eMP.AddManager(ID, Reports, BonPerRept);
            return(RedirectToAction("getEmp", new { id = ID }));
        }
예제 #3
0
        public ActionResult AddSls(String Name, double Salary, String Dept, double Comission, double ComissionRate, int numSales)
        {
            localhost.MVC3WebbyStuff eMP = new localhost.MVC3WebbyStuff();
            int ID = eMP.AddEmployee(Name, Salary, Dept);

            eMP.AddSalesEmp(ID, Comission, ComissionRate, numSales);
            return(RedirectToAction("getEmp", new { id = ID }));
        }
예제 #4
0
        public ActionResult getEmp(int id)
        {
            localhost.MVC3WebbyStuff       eMP  = new localhost.MVC3WebbyStuff();
            MVC3WebbyStuff.Models.Employee empL = eMP.getEmployeesByID(id);
            ViewData["Name"]   = empL.Name;
            ViewData["ID"]     = empL.Number;
            ViewData["Salary"] = empL.Salary;
            ViewData["Dept"]   = empL.Department;

            return(View());
        }
예제 #5
0
 public ActionResult Department()
 {
     localhost.MVC3WebbyStuff eMP = new localhost.MVC3WebbyStuff();
     String[] depts = eMP.getDepartments();
     return(View(depts));
 }
예제 #6
0
 public ActionResult getEmpByDept(String dept)
 {
     localhost.MVC3WebbyStuff eMP = new localhost.MVC3WebbyStuff();
     Employee[] empL = eMP.getEmployeesByDept(dept);
     return(View(empL));
 }
예제 #7
0
 public ActionResult SlsList()
 {
     localhost.MVC3WebbyStuff eMP  = new localhost.MVC3WebbyStuff();
     SalesEmployee[]          empL = eMP.getAllSales();
     return(View(empL));
 }
예제 #8
0
 public ActionResult MgrList()
 {
     localhost.MVC3WebbyStuff eMP = new localhost.MVC3WebbyStuff();
     Manager[] empL = eMP.getAllManagers();
     return(View(empL));
 }
예제 #9
0
 public ActionResult EmpList()
 {
     localhost.MVC3WebbyStuff         eMP  = new localhost.MVC3WebbyStuff();
     MVC3WebbyStuff.Models.Employee[] empL = eMP.getAllEmployees();
     return(View(empL));
 }