Exemplo n.º 1
0
        public ActionResult AddEditProgramFormat(long?programFormatTypeId)
        {
            var viewModel = new AddEditProgramFormatViewModel();

            if (programFormatTypeId.HasValue)
            {
                var drProgramFormat = CRCDataAccess.GetProgramFormatType(programFormatTypeId.Value);
                drProgramFormat.MapTo(viewModel);

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

            return(PartialView(viewModel));
        }