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 })); }
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 })); }
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 })); }