protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); //Poligono mvx.RegisterType <IPoligonoServicio, PoligonoServicio>(); //Rol mvx.RegisterType <IRolServicio, RolServicio>(); mvx.RegisterSingleton <IRolVista, User>(this); mvx.RegisterType <IRolControlador, RolControlador>(); mvx.Resolve <IRolControlador>(); //Ruta mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterSingleton <IRutaVista, User>(this); mvx.RegisterType <IRutaControlador, RutaControlador>(); mvx.Resolve <IRutaControlador>(); VistaTerminoDeCargar?.Invoke(this, null); if (!Page.IsPostBack) { Session["ListaRuta"] = null; Session["UiVistaPoligonosDeRuta"] = null; } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IPoligonoServicio, PoligonoServicio>(); mvx.RegisterType <IVendedorServicio, VendedorServicio>(); mvx.RegisterSingleton <IClientesPorPoligonoVista, FrmPolygonBySeller>(this); mvx.RegisterType <IClientesPorPoligonoControlador, ClientesPorPoligonoControlador>(); mvx.Resolve <IClientesPorPoligonoControlador>(); if (!Page.IsPostBack) { Session["UiListadoDePoligonos"] = null; Session["UiListadoDeClientes"] = null; Session["UiListaDeVendedores"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>( new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IClienteServicio, ClienteServicio>(); mvx.RegisterType <IEtiquetaServicio, EtiquetaServicio>(); mvx.RegisterType <IScoutingServicio, ScoutingServicio>(); mvx.RegisterType <IEmpresaServicio, EmpresaServicio>(); mvx.RegisterType <ILocalizacionGeograficaServicio, LocalizacionGeograficaServicio>(); mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterSingleton <IScoutingVista, FrmScouting>(this); mvx.RegisterType <IScoutingControlador, ScoutingControlador>(); mvx.Resolve <IScoutingControlador>(); if (!Page.IsPostBack) { Session["UiVistaEtiquetas"] = null; Session["UiListaClientesNuevos"] = null; Session["UiListaEtiquetas"] = null; Session["UiListaEtiquetasDisponibles"] = null; Session["UiListaDepartamentos"] = null; Session["UiListaMunicipio"] = null; Session["UiListaRuta"] = null; Session["FrecuenciaDeClienteScouting"] = null; Session["UiListaEmpresas"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
/// <summary> /// Evento de vista /// </summary> protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IOrdenDeVentaServicio, OrdenDeVentaServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterSingleton <IOrdenVentaVista, FrmPreSale>(this); mvx.RegisterType <IOrdenVentaControlador, OrdenVentaControlador>(); mvx.Resolve <IOrdenVentaControlador>(); if (!Page.IsPostBack) { Session["CantidadDecimalesAMostrar"] = null; Session["UiVisOrdenesVenta"] = null; Session["UiVistaPreSaleDetalle"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); EstablecerTotalesYGrupoDeSuma(); } }
protected void Page_Init(object sender, EventArgs e) { if (ValidarConexionYUsuarioLogueado(sender)) { var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IDevolucionDeInventarioServicio, DevolucionDeInventarioServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterSingleton <IDevolucionDeInventarioVista, FrmDevolution>(this); mvx.RegisterType <IDevolucionDeInventarioControlador, DevolucionDeInventarioControlador>(); mvx.Resolve <IDevolucionDeInventarioControlador>(); if (!Page.IsPostBack) { UiFechaIncio.Value = DateTime.Today; UiFechaFinal.Value = DateTime.Now; Session["UiListadoDePoligonos"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); EstablecerTotalesYGrupoDeSuma(); } } }
private void Page_Init(object sender, EventArgs e) { if (IsPostBack) { ((CMvx)System.Web.HttpContext.Current.Session["Mvx"]).Resolve <IDemoControlador>().Vista = this; return; } if (mvc) { var mvx = new CMvx(); HttpContext.Current.Session.Add("Mvx", mvx); mvx.RegisterSingleton <IConfiguracionDeConeccion, ConfiguracionDeConeccion>(new ConfiguracionDeConeccion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IDemoServicio, DemoServicio>(); mvx.RegisterSingleton <IDemoVista, Default>(this); mvx.RegisterType <IDemoControlador, DemoControlador>(); _demoControlador = mvx.Resolve <IDemoControlador>(); if (VistaCargandosePorPrimeraVez != null) { VistaCargandosePorPrimeraVez(this, null); } } }
/// <summary> /// Page Init /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>( new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterType <IConsignatarioServicio, ConsignacionServicio>(); mvx.RegisterSingleton <IConsultaConsignacionVista, FrmConsignment>(this); mvx.RegisterType <IConsultaConsignacionControlador, ConsultaConsignacionControlador>(); mvx.Resolve <IConsultaConsignacionControlador>(); if (!Page.IsPostBack) { UiFechaIncio.Value = DateTime.Today; UiFechaFinal.Value = DateTime.Today; Session["UiVistaTransaccionesConsignacion"] = null; Session["UiVistaDetalle"] = null; Session["UiVistaConsignacion"] = null; Session["CantidadDecimalesAMostrar"] = null; Session["ConsignacionesHistoricas"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (ValidarConexionYUsuarioLogueado(sender)) { var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IMetaServicio, MetaServicio>(); mvx.RegisterType <IEquipoServicio, EquipoServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterSingleton <IMetaVista, FrmGoals>(this); mvx.RegisterType <IMetaControlador, MetaControlador>(); mvx.Resolve <IMetaControlador>(); if (!Page.IsPostBack) { Session["UiVistaMeta"] = null; Session["UiVistaMetaDetalle"] = null; Session["UiListaEquipos"] = null; Session["CantidadDeDecimalesParaCalculo"] = null; Session["UiVistaEstadistica"] = null; VistaCargandosePorPrimeraVez?.Invoke(sender, e); EstablecerDecimalesParaControles(); } } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IPoligonoServicio, PoligonoServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterSingleton <IActiveRouteGpsVista, ActiveRouteGPS>(this); mvx.RegisterType <IActiveRouteGpsControlador, ActiveRouteGpsControlador>(); mvx.Resolve <IActiveRouteGpsControlador>(); if (!Page.IsPostBack) { Session["PuntosDePoligonoDeVendedoresEnRuta"] = null; // e.DisplayText = Session["SYMBOL_CURRENCY"].ToString() + e.Value; VistaCargandosePorPrimeraVez?.Invoke(this, null); EstablecerDecimalesParaControles(); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IPoligonoServicio, PoligonoServicio>(); mvx.RegisterType <IClasificacionServicio, ClasificacionServicio>(); mvx.RegisterType <IBodegaServicio, BodegaServicio>(); mvx.RegisterSingleton <IPoligonoSectorVista, FrmPoligonoSector>(this); mvx.RegisterType <IPoligonoSectorControlador, PoligonoSectorControlador>(); mvx.Resolve <IPoligonoSectorControlador>(); if (!Page.IsPostBack) { Session["PoligonoDeSector"] = null; Session["PuntosDePoligonoDeSector"] = null; Session["UiListaRegion"] = null; Session["PuntosDePoligonoPadreSector"] = null; Session["UiListaClasificacionSector"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } if (!IsPostBack) { Session["UiVistaFrecuencia"] = null; Session["UiListaRuta"] = null; Session["UiListaClientes"] = null; Session["UiVistaClientes"] = null; Session["UiListaRutasCliente"] = null; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IFrecuenciaServicio, FrecuenciaServicio>(); mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterType <IClienteServicio, ClienteServicio>(); mvx.RegisterSingleton <IFrecuenciaVista, FrmFrequency>(this); mvx.RegisterType <IFrecuenciaControlador, FrecuenciaControlador>(); mvx.Resolve <IFrecuenciaControlador>(); if (!Page.IsPostBack) { VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <ISecuenciaDocumentoServicio, SecuenciaDocumentoServicio>(); mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterType <ILocalizacionGeograficaServicio, LocalizacionGeograficaServicio>(); mvx.RegisterType <IScoutingServicio, ScoutingServicio>(); mvx.RegisterSingleton <IDatosAdicionalesScoutingVista, PopScoutingAceptado>(this); mvx.RegisterType <IDatosAdicionalesScoutingControlador, DatosAdicionalesScoutingControlador>(); mvx.Resolve <IDatosAdicionalesScoutingControlador>(); if (!Page.IsPostBack) { Session["UiListaDepartamentos"] = null; Session["UiListaMunicipio"] = null; Session["UiListaRuta"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IOrganizacionDeVentasServicio, OrganizacionDeVentasServicio>(); mvx.RegisterType <IOficinaDeVentaServicio, OficinaDeVentaServicio>(); mvx.RegisterSingleton <IOficinaDeVentaVista, FrmSalesOffice>(this); mvx.RegisterType <IOficinaDeVentaControlador, OficinaDeVentaControlador>(); mvx.Resolve <IOficinaDeVentaControlador>(); if (!Page.IsPostBack) { Session["UiVistaOficinaDeVentas"] = null; Session["UiVistaVendedoresOficina"] = null; Session["UiListaVendedor"] = null; Session["UiListaOrgVentas"] = null; Session["UiVistaBodegasAsociadasAOficinaDeVentas"] = null; Session["UiListaBodegasNoAsociadasAOficinaDeVentas"] = null; Session["IdOficina"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IPerformaceDeRutaServicio, PerformaceDeRutaServicio>(); mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterSingleton <IPerformanceDeRutaVista, FrmPerformanceRoute>(this); mvx.RegisterType <IPerformanceDeRutaControlador, PerformanceDeRutaControlador>(); mvx.Resolve <IPerformanceDeRutaControlador>(); if (!Page.IsPostBack) { Session["UiVistaPerformanceDeRuta"] = null; Session["UiListaRuta"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); UsuarioDeseaObtenerRutas?.Invoke(sender, new RutaArgumento { Usuario = new Usuario { LOGIN = Session["LOGIN"].ToString() } }); UiFechaDeInicio.Value = DateTime.Today; UiFechaFinal.Value = DateTime.Today; } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterType <IEncuestaDeCompetenciaServicio, EncuestaDeCompetenciaServicio>(); mvx.RegisterSingleton <IEncuestaDeCompetenciaVista, FrmBussinesRivalPoll>(this); mvx.RegisterType <IEncuestaDeCompetenciaControlador, EncuestaDeCompetenciaControlador>(); mvx.Resolve <IEncuestaDeCompetenciaControlador>(); if (!Page.IsPostBack) { Session["UiVistaEncuestaDeCompetencia"] = null; Session["UiListaRuta"] = null; VistaCargandosePorPrimeraVez?.Invoke(sender, new ConsultaArgumento { Login = Session["LOGIN"].ToString() }); UiFechaDeInicio.Value = DateTime.Today; UiFechaFinal.Value = DateTime.Today; } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <ISecuenciaDocumentoServicio, SecuenciaDocumentoServicio>(); mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterType <IClasificacionServicio, ClasificacionServicio>(); mvx.RegisterSingleton <ISecuenciaDocumentoVista, FrmDocumentSequence>(this); mvx.RegisterType <ISecuenciaDocumentoControlador, SecuenciaDocumentoControlador>(); mvx.Resolve <ISecuenciaDocumentoControlador>(); if (!Page.IsPostBack) { Session["UiVistaSecuenciaDocumentos"] = null; Session["UiListaRuta"] = null; Session["UIListaTipoDocumento"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
/// <summary> /// Inicia todos los componentes para el MVC a travez del CMvx /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IPromoServicio, PromoServicio>(); mvx.RegisterType <ISkuServicio, SkuServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterSingleton <IPromoPrecioEspecialVista, FrmPromoBySpecialPrice>(this); mvx.RegisterType <IPromoPrecioEspecialContolador, PromoPrecioEspecialContolador>(); mvx.Resolve <IPromoPrecioEspecialContolador>(); if (!Page.IsPostBack) { Session["UiListaSkusDisponiblesParaPromocionPorPrecioEspecial"] = null; Session["UiVistaSkusAsociadosPromoPorPrecioEspecial"] = null; Session["UiVistaDePromocionesPorPrecioEspecial"] = null; UsuarioDeseaObtenerPromosPorPrecioEspecial?.Invoke(sender, new PromoArgumento { Promo = new Promo { PROMO_TYPE = Enums.GetStringValue(TiposDePromocion.PrecioEspecial) } }); UsuarioDeseaObtenerSkusSinAsociarAPromo?.Invoke(sender, null); EstablecerDecimalesParaControles(); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IPoligonoServicio, PoligonoServicio>(); mvx.RegisterSingleton <IPoligonoRegionVista, FrmPolygonRegion>(this); mvx.RegisterType <IPoligonoRegionControlador, PoligonoRegionControlador>(); mvx.Resolve <IPoligonoRegionControlador>(); if (!Page.IsPostBack) { Session["UiVistaPolignosRegion"] = null; Session["PuntosDePoligonoRegion"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); ScriptManager.RegisterStartupScript(this, GetType(), "CargarPoligonos", "CargarPoligonos();", true); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IUsuarioServicio, UsuarioServicio>(); mvx.RegisterSingleton <IPedidoMinimoVista, FrmMinimumOrder>(this); mvx.RegisterType <IPedidoMinimoControlador, PedidoMinimoControlador>(); mvx.Resolve <IPedidoMinimoControlador>(); if (!Page.IsPostBack) { Session["UiListaDeUsuarios"] = null; Session["UiVistaDePedidosMinimos"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterType <ITareaServicio, TareaServicio>(); mvx.RegisterSingleton <ICumplimientoDeRutaVista, FrmComplianceRoute>(this); mvx.RegisterType <ICumplimientoDeRutaControlador, CumplimientoDeRutaControlador>(); mvx.Resolve <ICumplimientoDeRutaControlador>(); if (!Page.IsPostBack) { Session["UiListaRuta"] = null; Session["UiVistaCumplimientoDeRuta"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>( new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterType <IFacturacionServicio, FacturacionServicio>(); mvx.RegisterSingleton <IFacturaPorSkuVista, FrmInvoiceBySku>(this); mvx.RegisterType <IFacturaPorSkuControlador, FacturaPorSkuControlador>(); mvx.Resolve <IFacturaPorSkuControlador>(); if (!Page.IsPostBack) { UiFechaIncio.Value = DateTime.Today; UiFechaFinal.Value = DateTime.Today; Session["UiVistaEncabezadoFacturaPorSku"] = null; Session["FacturaEncabezadoFacturaPorSku"] = null; Session["CantidadDecimalesAMostrar"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
/// <summary> /// Page Init /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Init(object sender, EventArgs e) { if (!IsPostBack) { Session["UiListaCanales"] = null; Session["UiListaTipoCanal"] = null; Session["UiVistaClientesAsociados"] = null; Session["UiVistaClientesNoAsociados"] = null; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <ICanalServicio, CanalServicio>(); mvx.RegisterType <IClienteServicio, ClienteServicio>(); mvx.RegisterType <IClasificacionServicio, ClasificacionServicio>(); mvx.RegisterSingleton <ICanalVista, FrmChannel>(this); mvx.RegisterType <ICanalControlador, CanalControlador>(); mvx.Resolve <ICanalControlador>(); if (!Page.IsPostBack) { VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (ValidarConexionYUsuarioLogueado(sender)) { var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>( new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IAdministrarLicenciasServicio, AdministrarLicenciasServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterType <IUsuarioServicio, UsuarioServicio>(); mvx.RegisterSingleton <IAdministrarLicenciasVista, FrmLicenseManager>(this); mvx.RegisterType <IAdministrarLicenciasControlador, AdministrarLicenciasControlador>(); mvx.Resolve <IAdministrarLicenciasControlador>(); if (!Page.IsPostBack) { Session["UiVistaLicencias"] = null; Session["UiVistaUsuariosAsignadosALicencia"] = null; Session["UiListaUsuariosNoAsociadosALicencia"] = null; UsuarioDeseaObtenerLicenciasAsociadas?.Invoke(sender, new AdministrarLicenciasArgumento { LOGIN = Session["LOGIN"].ToString() }); } } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <ISkuServicio, SkuServicio>(); mvx.RegisterType <IInventarioServicio, InventarioServcio>(); mvx.RegisterType <IBodegaServicio, BodegaServicio>(); mvx.RegisterSingleton <ICargaDeInventarioVista, FrmInventoryCharge>(this); mvx.RegisterType <ICargaDeInventarioControlador, CargaDeInventarioControlador>(); mvx.Resolve <ICargaDeInventarioControlador>(); if (!Page.IsPostBack) { Session["UiListaSku"] = null; Session["UiListaSkuConSerie"] = null; Session["UiVistaListainventario"] = null; Session["UiVistaListaInventarioConSerie"] = null; Session["UiListaBodega"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IClienteServicio, ClienteServicio>(); mvx.RegisterType <IOrdenDeVentaServicio, OrdenDeVentaServicio>(); mvx.RegisterSingleton <IOrdenDeVentaAutorizacionVista, FrmSalesOrderAuthorization>(this); mvx.RegisterType <IOrdenDeVentaAutorizacionControlador, OrdenDeVentaAutorizacionControlador>(); mvx.Resolve <IOrdenDeVentaAutorizacionControlador>(); if (!Page.IsPostBack) { Session["EstadoDecuentaEncabezado"] = null; Session["UiVistaFacturasVencidas"] = null; Session["UiVistaOrdenesDeVentaNoAutorizadas"] = null; Session["UiVistaDetalleOrdenDeVentaNoAutorizada"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); EstablecerTotalesYGrupoDeSuma(); } }
/// <summary> /// Page_Init(object sender, EventArgs e) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Init(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IPromoServicio, PromoServicio>(); mvx.RegisterType <ISkuServicio, SkuServicio>(); mvx.RegisterType <IPromoDeVentaServicio, PromoDeVentaServicio>(); mvx.RegisterSingleton <IPromoDeVentaPorMultiploVista, FrmPromoOfSalesByMultiple>(this); mvx.RegisterType <IPromoDeVentaPorMultiploControlador, PromoDeVentaPorMultiploControlador>(); mvx.Resolve <IPromoDeVentaPorMultiploControlador>(); if (!Page.IsPostBack) { Session["UiListaDeSkusNoAsociadosAPromocionDeVentaPorMultiplo"] = null; Session["UiVistaDePromocionesDeVentaPorMultiplo"] = null; Session["UiVistaDeSkusAsociadosAPromocionDeVentaPorMultiplo"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } }
protected void Page_Init(object sender, EventArgs e) { if (ValidarConexionYUsuarioLogueado(sender)) { var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IRecibosEmitidosServicio, RecibosEmitidosServicio>(); mvx.RegisterSingleton <IRecibosEmitidosVista, FrmReportReceiptsIssued>(this); mvx.RegisterType <IRecibosEmitidosControlador, RecibosEmitidosControlador>(); mvx.Resolve <IRecibosEmitidosControlador>(); if (!Page.IsPostBack) { Session["UiVistaRecibosEmitidos"] = null; Session["UiVistaTipoDePago"] = null; Session["UiVistaFacturasCanceladas"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); EstablecerDecimalesParaControles(); } } }
protected void Page_Init(object sender, EventArgs e) { if (ValidarConexionYUsuarioLogueado(sender)) { var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IEquipoServicio, EquipoServicio>(); mvx.RegisterType <IUsuarioServicio, UsuarioServicio>(); mvx.RegisterSingleton <IEquipoVista, FrmTeam>(this); mvx.RegisterType <IEquipoControlador, EquipoControlador>(); mvx.Resolve <IEquipoControlador>(); if (!Page.IsPostBack) { Session["UiVistaEquipo"] = null; Session["UiListaUsuariosParaSupervisor"] = null; Session["UiListaDeUsuariosDisponibles"] = null; Session["UiVistaUsuariosAsociados"] = null; VistaCargandosePorPrimeraVez?.Invoke(this, null); } } }
public void ProcessRequest(HttpContext context) { var cnn = context.Request.QueryString["cnn"]; var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion(cnn)); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IOrdenDeVentaServicio, OrdenDeVentaServicio>(); XLWorkbook workbook = new XLWorkbook(); IXLWorksheet worksheet = workbook.Worksheets.Add("Detalle de Orden de Venta"); worksheet.Protect("Mobility2016$$"); var servicio = mvx.Resolve <IOrdenDeVentaServicio>(); var templateExcel = servicio.GenerarColumnasParaTemplate(); int i = 1; foreach (var columna in templateExcel) { worksheet.Cell(1, i).Value = columna.VALUE; worksheet.Column(i).Style.Protection.SetLocked(false); worksheet.Column(i).Width = 25; if (columna.VALUE == "Fecha de entrega") { worksheet.Column(i).Style.NumberFormat.Format = "dd/mm/yyyy"; } if (columna.VALUE == "Cantidad") { worksheet.Column(i).Style.NumberFormat.Format = "##.######"; } i++; } worksheet.Row(1).Style.Protection.SetLocked(true); MemoryStream s = (MemoryStream)GetStream(workbook); HttpResponse response = HttpContext.Current.Response; response.ClearContent(); response.Clear(); response.ContentType = "text/plain"; response.AddHeader("Content-Disposition", "attachment; filename=sale_order.xlsx;"); //response.TransmitFile(HttpContext.Current.Server.MapPath("~/UploadedFiles/SalesOrders/sale_order.xlsx")); response.BinaryWrite(s.ToArray()); response.Flush(); response.End(); }
private void IniciarMvx() { var mvx = new CMvx(); mvx.RegisterSingleton <IConfiguracionDeConexion, frmMainMenu.ConfiguracionDeConexion>(new frmMainMenu.ConfiguracionDeConexion()); mvx.RegisterType <IBaseDeDatosServicio, BaseDeDatosServicio>(); mvx.RegisterType <IFrecuenciaServicio, FrecuenciaServicio>(); mvx.RegisterType <IParametroServicio, ParametroServicio>(); mvx.RegisterSingleton <ISecuenciaManualVista, FrmSecuenceVisit>(this); mvx.RegisterType <ISecuenciaManualControlador, SecuenciaManualControlador>(); mvx.Resolve <ISecuenciaManualControlador>(); }