コード例 #1
0
        public ActionResult AddEditMajorFormat(long?majorFormatId)
        {
            var viewModel = new AddEditMajorFormatViewModel();

            if (majorFormatId.HasValue)
            {
                var drMajorFormat = CRCDataAccess.GetMajorFormat(majorFormatId.Value);
                drMajorFormat.MapTo(viewModel);

                viewModel.EnabledInd = !(drMajorFormat["DisabledDate"] is DateTime);
            }

            return(PartialView(viewModel));
        }