예제 #1
0
 public JsonResult ValidateDate(DateViewModel viewModel)
 {
     try
     {
         DateMapper.Map(viewModel);
         return Json(true);
     }
     catch (Exception)
     {
         return Json(false);
     }
 }
예제 #2
0
 public static DateTime Map(DateViewModel viewModel)
 {
     return new DateTime(viewModel.Year, viewModel.Month, viewModel.Day);
 }