Exemplo n.º 1
0
        public ActionResult AddEditProgram(long?programId)
        {
            var viewModel = new AddEditProgramViewModel();

            if (programId.HasValue)
            {
                var drProgram = CRCDataAccess.GetProgram(programId.Value);
                drProgram.MapTo(viewModel);

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

            return(View(viewModel));
        }