public ActionResult EditarRegistroControl(int idControl) { ControlModels modelo = new ControlModels(); try { ConsultasBL consultasBL = new ConsultasBL(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <CONTROL, ControlModels>(); }); IMapper iMapper = config.CreateMapper(); modelo = iMapper.Map <CONTROL, ControlModels>(consultasBL.ConsultarControl(idControl)); } catch (Exception) { throw; } return(View(modelo)); }
public ActionResult Listado() { List <ClienteModels> modelo = new List <ClienteModels>(); try { ConsultasBL consultasBL = new ConsultasBL(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <CLIENTE, ClienteModels>(); }); IMapper iMapper = config.CreateMapper(); modelo = iMapper.Map <List <CLIENTE>, List <ClienteModels> >(consultasBL.ConsulatrCitas()); } catch (Exception) { throw; } return(View(modelo)); }
public ActionResult ListaRegistroControl(int idCita) { List <ControlModels> modelo = new List <ControlModels>(); try { ConsultasBL consultasBL = new ConsultasBL(); var config = new MapperConfiguration(cfg => { cfg.CreateMap <CONTROL, ControlModels>(); }); IMapper iMapper = config.CreateMapper(); modelo = iMapper.Map <List <CONTROL>, List <ControlModels> >(consultasBL.ConsulaControles(idCita)); ViewBag.idCita = idCita; } catch (Exception) { throw; } return(View(modelo)); }