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

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

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

            eMP.AddManager(ID, Reports, BonPerRept);
            return(RedirectToAction("getEmp", new { id = ID }));
        }