public ActionResult ApplyProgramDataItem(EnterpriseProgramItemViewModel viewModel)
        {
            ViewBag.ViewModel = viewModel;

            if (!viewModel.ListPrice.HasValue || viewModel.ListPrice < 0)
            {
                ModelState.AddModelError("ListPrice", "請輸入體能顧問終點費用!!");
            }

            if (!viewModel.PriceID.HasValue)
            {
                ModelState.AddModelError("PriceID", "請選擇體能顧問服務項目!!");
            }

            if (!viewModel.Lessons.HasValue || viewModel.Lessons <= 0)
            {
                ModelState.AddModelError("Lessons", "請輸入購買堂數!!");
            }

            var item = models.GetTable <EnterpriseLessonType>().Where(t => t.TypeID == viewModel.PriceID).FirstOrDefault();

            if (item == null)
            {
                ModelState.AddModelError("PriceID", "請選擇體能顧問服務項目!!");
            }

            if (!ModelState.IsValid)
            {
                ViewBag.ModelState = ModelState;
                return(View("~/Views/Shared/ReportInputError.ascx"));;
            }

            return(View("~/Views/EnterpriseProgram/Module/ApplyProgramDataItem.ascx", item));
        }
 public ActionResult EditProgramDataItem(EnterpriseProgramItemViewModel viewModel)
 {
     ViewBag.ViewModel = viewModel;
     return(View("~/Views/EnterpriseProgram/Module/EditProgramDataItem.ascx"));
 }