예제 #1
0
 public ActionResult LayNGayKetThucHoanChinhDaTinhNgay(DateTime?ngaybd, int?SoBuoi, int?Buoi1, int?Buoi2, int?KhuVuc)
 {
     try
     {
         var model = db.APAX_HamLayNgayKetThucBaoLuu(ngaybd.Value.ToString("yyyy-MM-dd"), Buoi1, Buoi2, SoBuoi, KhuVuc).FirstOrDefault();
         return(Json(model.Date.Value.ToString("dd/MM/yyyy"), JsonRequestBehavior.AllowGet));
     }
     catch
     {
         return(Json(null, JsonRequestBehavior.AllowGet));
     }
 }
예제 #2
0
 public DateTime LayNgayKetThucDateTime(DateTime?ngaybd, int?SoBuoi, int?Buoi1, int?Buoi2, int?KhuVuc)
 {
     try
     {
         string ngaybatdau = ngaybd.Value.ToString("yyyy-MM-dd");
         var    model      = db.APAX_HamLayNgayKetThucBaoLuu(ngaybd.Value.ToString("yyyy-MM-dd"), Buoi1, Buoi2, SoBuoi, KhuVuc).ToList();
         return(model[0].Date.Value);
     }
     catch
     {
         return(DateTime.Now);
     }
 }