Esempio n. 1
0
        public ActionResult StatusSailor(int id)
        {
            int     notifType = Convert.ToInt32(Request["type"]);
            int     historyId = Convert.ToInt32(Request["historyId"]);
            DataSet ds        = cn.SailorDS(id);
            DataRow dr        = ds.Tables[0].Rows[0];

            sm.SailorId              = Convert.ToInt32(dr["SailorId"]);
            sm.SailorName            = dr["SailorName"].ToString();
            sm.BirthDate             = Convert.ToDateTime(dr["DateOfBirth"]);
            sm.MaritialStatus        = Convert.ToInt32(dr["MaritialStatus"]);
            sm.Address               = dr["Address"].ToString();
            sm.Height                = Convert.ToDouble(dr["Height"]);
            sm.Weight                = Convert.ToDouble(dr["Weight"]);
            sm.BloodType             = dr["BloodType"].ToString();
            sm.ShoeSize              = Convert.ToInt32(dr["ShoeSize"]);
            sm.JobStatus             = Convert.ToInt32(dr["JobStatus"]);
            sm.Password              = dr["Password"].ToString();
            sm.Type                  = 3.ToString();//Type:status change
            ViewBag.MaritialList     = JKLModel.getMaritialStatus();
            ViewBag.BloodTypeList    = JKLModel.getBloodType();
            ViewBag.notificationType = notifType;
            ViewBag.HistoryId1       = historyId;
            if (notifType == 1)
            {
                ViewBag.JobStatusList = JKLModel.getJobStatus(1);
            }
            if (notifType == 2)
            {
                ViewBag.JobStatusList = JKLModel.getJobStatus(2);
            }

            return(View("StatusSailor", sm));
        }
Esempio n. 2
0
 public ActionResult RegisterSailor()    // Calling when we first hit controller.
 {
     ViewBag.MaritialList  = JKLModel.getMaritialStatus();
     ViewBag.BloodTypeList = JKLModel.getBloodType();
     ViewBag.JobStatusList = JKLModel.getJobStatus();
     return(View());
 }
Esempio n. 3
0
 public ActionResult RegisterSailor(Sailor SM)
 {
     ViewBag.ErrorMessage  = cn.SailorAdd(SM);
     ViewBag.MaritialList  = JKLModel.getMaritialStatus();
     ViewBag.BloodTypeList = JKLModel.getBloodType();
     ViewBag.JobStatusList = JKLModel.getJobStatus();
     return(View());
 }
Esempio n. 4
0
        public ActionResult EditSailor(int id)
        {
            DataSet ds = cn.SailorDS(id);
            DataRow dr = ds.Tables[0].Rows[0];

            sm.SailorId           = Convert.ToInt32(dr["SailorId"]);
            sm.SailorName         = dr["SailorName"].ToString();
            sm.BirthDate          = Convert.ToDateTime(dr["DateOfBirth"]);
            sm.MaritialStatus     = Convert.ToInt32(dr["MaritialStatus"]);
            sm.Address            = dr["Address"].ToString();
            sm.Height             = Convert.ToDouble(dr["Height"]);
            sm.Weight             = Convert.ToDouble(dr["Weight"]);
            sm.BloodType          = dr["BloodType"].ToString();
            sm.ShoeSize           = Convert.ToInt32(dr["ShoeSize"]);
            sm.JobStatus          = Convert.ToInt32(dr["JobStatus"]);
            sm.Password           = dr["Password"].ToString();
            sm.Type               = 2.ToString();//edit Type
            ViewBag.MaritialList  = JKLModel.getMaritialStatus();
            ViewBag.BloodTypeList = JKLModel.getBloodType();
            ViewBag.JobStatusList = JKLModel.getJobStatus();
            return(View("RegisterSailor", sm));
        }