public ActionResult RegisterService() { ViewBag.SailorList = JKLModel.getSailor(); ViewBag.RankList = JKLModel.getRank(); ViewBag.VesselList = JKLModel.getVessel(null); return(View()); }
public ActionResult RegisterEmployee(ServiceModel SM) // Calling on http post (on Submit) { ViewBag.SailorList = JKLModel.getSailor(); ViewBag.RankList = JKLModel.getRank(); ViewBag.VesselList = JKLModel.getVessel(null); ViewBag.ErrorMessage = cn.ServiceAdd(SM); cn.EmployeeDelete(SM.HistoryId); return(View("AddEmployee")); }
public ActionResult AddEmployee() { if (Session["Partner"] != null) { DataTable dt = (DataTable)Session["Partner"]; int Id = Convert.ToInt32(dt.Rows[0]["CompanyId"]); ViewBag.Company = Id; ViewBag.VesselList = JKLModel.getVessel(Id); } ViewBag.RankList = JKLModel.getRank(); return(View()); }
public ActionResult RegisterEmployee() { int empId = Convert.ToInt32(Request["empId"]); int companyId = Convert.ToInt32(Request["companyId"]); int vesselId = Convert.ToInt32(Request["vesselId"]); int rankId = Convert.ToInt32(Request["rankId"]); ServiceModel SM = new ServiceModel(); SM.HistoryId = empId; SM.VesselId = vesselId; SM.RankId = rankId; ViewBag.SailorList = JKLModel.getSailor(); ViewBag.RankList = JKLModel.getRank(); ViewBag.VesselList = JKLModel.getVessel(null); return(View("AddEmployee", SM)); }