Пример #1
0
 public ActionResult RegisterService()
 {
     ViewBag.SailorList = JKLModel.getSailor();
     ViewBag.RankList   = JKLModel.getRank();
     ViewBag.VesselList = JKLModel.getVessel(null);
     return(View());
 }
Пример #2
0
 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"));
 }
Пример #3
0
 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());
 }
Пример #4
0
        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));
        }