protected void Page_Load(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } if (Session["connectionString"] == null || Session["USER"] == null) { ScriptManager.RegisterStartupScript(this, GetType(), "Logoff", "LogOff();", true); UiVistaCumplimientoDeRuta.JSProperties.Add("cpLocation", "Enable"); return; } if (!IsPostBack) { UiFechaFiltro.Value = DateTime.Today; UsuarioDeseaObtenerRutas?.Invoke(sender, new RutaArgumento()); } if (Session["UiListaRuta"] != null) { UiListaRuta.DataSource = Session["UiListaRuta"]; UiListaRuta.DataBind(); } if (Session["UiVistaCumplimientoDeRuta"] != null) { UiVistaCumplimientoDeRuta.DataSource = Session["UiVistaCumplimientoDeRuta"]; UiVistaCumplimientoDeRuta.DataBind(); GenerarReporteVistaGeneral(); } }
void uiLista_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } switch (e.Parameters.Split('|')[0]) { case "ObtenerInformacionDeDepartamentos": var paisArgumento = new ScoutingArgumento(); paisArgumento.Pais = new Pais(); paisArgumento.Pais.COUNTRY = "GUATEMALA"; UsuarioDeseaObtenerDepartamentos?.Invoke(sender, paisArgumento); break; case "LlenarListaMunicipio": if (UiListaDepartamentos.Value != null) { var departamento = UiListaDepartamentos.Value.ToString(); var pais = new Pais(); pais.COUNTRY = "GUATEMALA"; UsuarioDeseaObtenerMunicipios?.Invoke(sender, new ScoutingArgumento { Departamento = new Departamento { DEPARTMENT = departamento, COUNTRY = pais.COUNTRY } }); } break; case "ObtenerRutas": var eventos = new EventArgs(); UsuarioDeseaObtenerRutas?.Invoke(sender, eventos); break; } }
void uiLista_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { switch (e.Parameters.Split('|')[0]) { case "ObtenerRuta": UsuarioDeseaObtenerRutas?.Invoke(UiVistaSecuenciaDocumentos, new SecuenciaDocumentosArgumento { Data = new SecuenciaDeDocumento { DOC_TYPE = e.Parameters.Split('|')[1], SERIE = e.Parameters.Split('|')[2], ASSIGNED_TO = e.Parameters.Split('|')[3] } }); break; case "RecargarListaSku": //UiListaRuta.Value = null; //UsuarioDeseaObtenerRutas?.Invoke(UiVistaSecuenciaDocumentos, new SecuenciaDocumentosArgumento{Data = new SecuenciaDeDocumento{DOC_TYPE = "", SERIE = ""}}); UiListaRuta.DataSource = null; UiListaRuta.DataBind(); break; case "LlenarListaRuta": UsuarioDeseaObtenerRutas?.Invoke(UiVistaSecuenciaDocumentos, new SecuenciaDocumentosArgumento { Data = new SecuenciaDeDocumento { DOC_TYPE = UIListaTipoDocumento.Value.ToString(), SERIE = UiTextoSerie.Text } }); break; } }
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; } }
void vistaListas_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } switch (e.Parameters.Split('|')[0]) { case "ObtenerRutas": UsuarioDeseaObtenerRutas?.Invoke(sender, new RutaArgumento()); break; } }
private void VistaListas_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } switch (e.Parameters.Split('|')[0]) { case "ObtenerRutas": UsuarioDeseaObtenerRutas?.Invoke(sender, new ConsultaArgumento { Login = Session["LOGIN"].ToString() }); break; } }
private void Vista_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { try { switch (e.Parameters.Split('|')[0]) { case "CargarListaDeRutas": UsuarioDeseaObtenerRutas?.Invoke(sender, null); break; } } catch (Exception exception) { EstablecerError(exception.Message, sender); } }
protected void Page_Load(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } if (!IsPostBack) { UsuarioDeseaObtenerSecuenciaDocumento?.Invoke(UiVistaSecuenciaDocumentos, new SecuenciaDocumentosArgumento()); UsuarioDeseaObtenerClasificaciones?.Invoke(UiVistaSecuenciaDocumentos, new SecuenciaDocumentosArgumento { DataClasificacion = new Clasificacion { GROUP_CLASSIFICATION = "DOC_TYPE" } }); UsuarioDeseaObtenerRutas?.Invoke(UiVistaSecuenciaDocumentos, new SecuenciaDocumentosArgumento { Data = new SecuenciaDeDocumento { DOC_TYPE = UIListaTipoDocumento.Value?.ToString() ?? "", SERIE = UiTextoSerie.Text } }); } if (Session["UiVistaSecuenciaDocumentos"] != null) { UiVistaSecuenciaDocumentos.DataSource = Session["UiVistaSecuenciaDocumentos"]; UiVistaSecuenciaDocumentos.DataBind(); } if (Session["UiListaRuta"] != null) { UiListaRuta.DataSource = Session["UiListaRuta"]; UiListaRuta.DataBind(); } if (Session["UIListaTipoDocumento"] != null) { UIListaTipoDocumento.DataSource = Session["UIListaTipoDocumento"]; UIListaTipoDocumento.DataBind(); } ReportViewer(); }
private void VistaListas_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { switch (e.Parameters.Split('|')[0]) { case "ObtenerRutas": UsuarioDeseaObtenerRutas?.Invoke(this, new LiquidacionArgumento { Login = Session["LOGIN"].ToString() }); break; case "ObtenerLiquidacionPendientes": UsuarioDeseaBuscarLiquidaciones?.Invoke(sender, new LiquidacionArgumento { Liquidacion = new Liquidacion { LIQUIDATION_DATE = UiFecha.Date, CODE_ROUTE = UiListaRutaPendiente.Value.ToString() } }); break; case "EstablecerLiquidacion": UiListaLiquidacionPendiente.Value = LiquidacionesDelDia[0].LIQUIDATION_ID; break; } }
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 <ILiquidacionServicio, LiquidacionServicio>(); mvx.Register <IParametroServicio, ParametroServicio>(); mvx.RegisterType <IRutaServicio, RutaServicio>(); mvx.RegisterSingleton <ILiquidacionVista, FrmLiquidation>(this); mvx.RegisterType <ILiquidacionControlador, LiquidacionControlador>(); mvx.Resolve <ILiquidacionControlador>(); if (!Page.IsPostBack) { Session["UiVistaEncabezadoPendiente"] = null; Session["UiVistaPendienteDetalle"] = null; Session["UiListaRutaPendiente"] = null; Session["UiListaLiquidacionPendiente"] = null; Session["UiVistaLiquidacionesCompletadas"] = null; Session["UiVistaDepositos"] = null; Session["UiVistaDepositosLiquidacionesCompletadas"] = null; UiFecha.Value = DateTime.Today; UiFechaFinalCompletadas.Value = DateTime.Today; UiFechaInicialCompletadas.Value = DateTime.Today; VistaCargandosePorPrimeraVez?.Invoke(this, null); UsuarioDeseaObtenerRutas?.Invoke(this, new LiquidacionArgumento { Login = Session["LOGIN"].ToString() }); } }
private void UiListaRutaVendedor_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { UsuarioDeseaObtenerRutas?.Invoke(sender, e); }