private void Page_Load(object sender, System.EventArgs e) { if (User.Identity.IsAuthenticated) { //this.SetCultura(); string sOpcion = "tarifReEnt"; Menu oMenu = (Menu)this.FindControl("Menu1"); this.ValidarSeguridad(oMenu, sOpcion); } Page.RegisterStartupScript("init", SisPackController.GenerarJavaScripts.SetearFocoControl(this.txtTarifarioDescrip.ClientID)); this.phValidTarifarioDescrip.Controls.Add(GenerarValidadores.DescripcionTarifario("txtTarifarioDescrip", this.TraducirTexto("Errores.Invalidos.TarifarioDescrip"), true, "valDescrip")); if (!IsPostBack) { this.BindGrid(0); LlenarCombos.ValorizacionTarifario(ddlValorizacion, this.TraducirTexto("Combos.Todos"), this.UnidadNegocioID); } else { BindGrid(dtgTarifarios.CurrentPageIndex); } }
protected void ConsultarDestino() { if (ddlTipoDestino.SelectedValue != "") { /*Implementacion de Agrupacion de Agencia en Zonas. Si seleccionó zonas cargo las zonas del usuario*/ if (ddlTipoDestino.SelectedValue == "7") { LlenarCombos.ZonasByUsuario(this.lstDestinoFlete, usuario.UsuarioID); } /*Implementacion de Agrupacion de Agencia en Zonas. Si seleccionó zonas cargo las zonas del usuario*/ else { LlenarCombos.DestinosFlete(this.lstDestinoFlete, Convert.ToInt32(ddlTipoDestino.SelectedValue), UnidadNegocioID, 0); } } else { LlenarCombos.TiposOrigenesDestinos(this.ddlTipoDestino); /*Implementacion de Agrupacion de Agencia en Zonas. Inserto acá para no tocar la base*/ this.ddlTipoDestino.Items.Add(new ListItem("Zona", "7")); } }
private void Editar() { DsCategoriaAutorizacionMail ds = new DsCategoriaAutorizacionMail(); List <ICategoriaAutorizacionMail> lista = new List <ICategoriaAutorizacionMail>(); SisPackController.AdministrarGrillas.Configurar(dtgDirecciones, "Mail", 10); ICategoriaAutorizacion categoria = CategoriaAutorizacionFactory.GetCategoriaAutorizacion(); categoria.CategoriaAutorizacionID = Convert.ToInt32(hdnCategoriaID.Value); categoria.Consultar(); Session["CategoriAut"] = categoria; ICategoriaAutorizacionMail categoriaMail = CategoriaAutorizacionMailFactory.GetCategoriaAutorizacionMail(); categoriaMail.CategoriaAutorizacionID = categoria.CategoriaAutorizacionID; ds = categoriaMail.GetCategorias(); dtgDirecciones.DataSource = ds; dtgDirecciones.DataBind(); for (int i = 0; i < ds.Datos.Rows.Count; i++) { ICategoriaAutorizacionMail catMail = CategoriaAutorizacionMailFactory.GetCategoriaAutorizacionMail(); DsCategoriaAutorizacionMail.DatosRow dr = (DsCategoriaAutorizacionMail.DatosRow)ds.Datos.Rows[i]; catMail.CategoriaAutorizacionID = int.Parse(dr.CategoriaAutorizacionID); catMail.CategoriaAutorizacionMailID = int.Parse(dr.CategoriaAutorizacionMailID); catMail.Mail = dr.Mail; lista.Add(catMail); } Session["CategoriaAutorizacionMail"] = lista; LlenarCombos.UsuariosCategoriasAutorizacion(lstDerecha, categoria.CategoriaAutorizacionID); txtNombre.Text = categoria.Nombre; txtImporteMaximo.Text = categoria.Importe.ToString(); txtMensaje.Text = categoria.Observacion; }
protected void ConsultarDestino() { if (ddlTipoDestino.SelectedValue != "") { if (txtTipoDestinoID.Text != ddlTipoDestino.SelectedValue) { IReporteHistoricoTarifario reporte = ReporteHistoricoTarifarioFactory.GerReporteHistoricoTarifarioFactory(); reporte.TipoDestinoID = Utiles.Validaciones.obtieneEntero(ddlTipoDestino.SelectedValue); DsDestinosFlete ds = reporte.GetDestinos(); lstDestinoFlete.Items.Clear(); lstDestinoFlete.DataSource = ds.Datos.Select("", "DestinoFleteDescrip"); lstDestinoFlete.DataTextField = "DestinoFleteDescrip"; lstDestinoFlete.DataValueField = "DestinoID"; lstDestinoFlete.DataBind(); } txtTipoDestinoID.Text = ddlTipoDestino.SelectedValue; } else { LlenarCombos.TiposOrigenesDestinos(this.ddlTipoDestino); } }
protected void chkCategoriaCliente_CheckedChanged(object sender, EventArgs e) { if (this.usuario.ClienteID == 0) { if (chkCategoriaCliente.Checked) { LlenarCombos.AgrupacionCliente(lstClientes, usuario.UsuarioID); } else { LlenarCombos.ClientesConCodigoCombo(this.lstClientes, this.TraducirTexto("Combos.ClientesEventuales"), this.UnidadNegocioID); } } else { ICliente cliente = ClienteFactory.GetCliente(); if (chkCategoriaCliente.Checked) { cliente.ClienteID = 99999; } else { cliente.ClienteID = this.usuario.ClienteID; } this.lstClientes.DataSource = cliente.GetClienteOne(); this.lstClientes.DataTextField = "RazonSocial"; this.lstClientes.DataValueField = "ClienteID"; this.lstClientes.DataBind(); cliente.ClienteID = this.usuario.ClienteID; this.lstClientes.DataSource = cliente.GetClienteOne(); this.lstClientes.DataTextField = "RazonSocial"; this.lstClientes.DataValueField = "ClienteID"; this.lstClientes.DataBind(); this.lstClientes.SelectedIndex = 0; this.chkClientesTodos.Checked = true; this.chkClientesTodos.Enabled = false; this.lstClientes.Attributes.Add("onblur", "window.document.getElementById('chkClientesTodos').checked=true;ChangeClienteTodos();"); } }
private void Page_Load(object sender, System.EventArgs e) { Page.RegisterStartupScript("init", SisPackController.GenerarJavaScripts.SetearFocoControl(this.txtTarifarioDescrip.ClientID)); //this.BindGrid(0); this.phValidTarifarioDescrip.Controls.Add(GenerarValidadores.DescripcionTarifario("txtTarifarioDescrip", this.TraducirTexto("Errores.Invalidos.TarifarioDescrip"), true, "valDescrip")); if (!IsPostBack) { this.BindGrid(0); // Cache Page.SmartNavigation = false; Response.Buffer = true; Response.Expires = -1000; Response.ExpiresAbsolute = DateTime.Now.AddDays(-1); Response.AddHeader("pragma", "no-cache"); Response.AddHeader("cache-control", "private"); Response.CacheControl = "no-cache"; //Session["dsTopesImportes"] = null; // LlenarCombos.ValorizacionTarifario(ddlValorizacion, this.TraducirTexto("Combos.Todos"), this.UnidadNegocioID); } }
private void butAgregar_Click(object sender, System.EventArgs e) { try { if (!Page.IsValid) { return; } IHojaRutaInterno hoja = HojaRutaInternoFactory.GetHojaRutaInterno(); hoja.HojaRutaInternoID = Utiles.Validaciones.obtieneEntero(txtHojaRutaInternoID.Text); DsHojaRutaInternoGuias ds = new DsHojaRutaInternoGuias(); if (Session["DsHojaRutaInterno"] != null) { ds = (DsHojaRutaInternoGuias)Session["DsHojaRutaInterno"]; } DsHojaRutaInternoGuias dsNuevo = hoja.AgregarGuiaByCodigoHojaRutaID(LlenarCombos.GuiaToGuiaID(txtGuia.Text)); foreach (DsHojaRutaInternoGuias.DatosRow drN in dsNuevo.Datos) { DsHojaRutaInternoGuias.DatosRow dr = ds.Datos.NewDatosRow(); dr.Asignada = true; dr.CantidadBultosTotal = drN.CantidadBultosTotal; dr.ClienteDescrip = drN.ClienteDescrip; dr.Codigo = drN.Codigo; dr.Destinatario = drN.Destinatario; dr.GuiaID = drN.GuiaID; dr.Prioridad = drN.Prioridad; dr.UnidadVentaDescrip = drN.UnidadVentaDescrip; ds.Datos.AddDatosRow(dr); } Session["DsHojaRutaInterno"] = ds; txtGuia.Text = ""; BindGrid(); } catch (Exception ex) { ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message); } }
public string LlenarServiciosTransportesComboByFecha(string fechaHojaRuta) { DsServicioTransporte ds = LlenarCombos.LlenarServiciosTransportesComboByFecha(Utiles.Fechas.FormatFechaDDMMYYYY(fechaHojaRuta)); string datos = ""; string sParadaDescrip = ""; foreach (DsServicioTransporte.DatosRow dr in ds.Datos.Rows) { sParadaDescrip = dr.IsParadaDescripNull() ? "" : dr.ParadaDescrip.Trim(); string nuevoDato = string.Concat(dr.LineaTransporteID, "%", dr.ServicioTransporteID, "%", dr.ServicioTransporteDescrip, "%", dr.LineaEmpresaSITT, "%", dr.HoraCabeceraOrigen, "%", dr.Chasis.Trim(), "%", dr.Interno.Trim(), "%", dr.Dominio.Trim(), "%", dr.CarroceriaNro.Trim(), "%", dr.CarroceriaMod.Trim(), "%", dr.CarroceriaMarca.Trim(), "%", dr.CarroceriaMarcaDes.Trim(), "%", dr.CarroceriaAnio, "%", sParadaDescrip, "%", dr.IsChoferIDNull() ? 0 : dr.ChoferID, "%", dr.IsNombreChoferNull() ? "" : dr.NombreChofer, "%", dr.IsLegajoChoferNull() ? "" : dr.LegajoChofer, ";"); if (datos.IndexOf(nuevoDato) < 0) { datos += nuevoDato; } } return(datos); }
protected void ConsultarDestino() { if (ddlTipoDestino.SelectedValue != "") { if (txtTipoDestinoID.Text != ddlTipoDestino.SelectedValue) { IReporteInternoRedespacho reporte = ReporteInternoRedespachoFactory.GetReporteInternoRedespacho(); reporte.EmpresaTercerosID = Utiles.Validaciones.obtieneEntero(EmpresaTerceros.EmpresaTercerosID); reporte.TipoDestinoID = Utiles.Validaciones.obtieneEntero(ddlTipoDestino.SelectedValue); DsOrigenDestinoFleteEmpresaTercero ds = reporte.GetDestino(); lstDestinoFlete.Items.Clear(); lstDestinoFlete.DataSource = ds.Datos; lstDestinoFlete.DataTextField = "FleteDescrip"; lstDestinoFlete.DataValueField = "FleteID"; lstDestinoFlete.DataBind(); } txtTipoDestinoID.Text = ddlTipoDestino.SelectedValue; } else { LlenarCombos.TiposOrigenesDestinos(this.ddlTipoDestino); } }
private void LlenarListas() { //LlenarCombos.Clientes(this.lstClientes, this.UnidadNegocioID); /* Diego M 02/07/2012 cambio para no ver clientes duplicados*/ LlenarCombos.ClientesCombos(this.lstClientes, this.UnidadNegocioID); if (this.tAlertasPorBolsin.Visible) { LlenarCombos.UnidadesVentasBolsin(this.lstUnidadesVenta); } if (this.tAlertasPorRestoUV.Visible) { LlenarCombos.UnidadesVentasSinBolsin(this.lstUnidadesVenta); } LlenarCombos.AgrupacionAgencia(this.lstZonas, usuario.UsuarioID); //LlenarCombos.Categoria(this.lstCatCliente, (int)NegociosSisPackInterface.SisPack.TipoCategoria.Cliente); LlenarCombos.CategoriaUVenta(this.lstCatUnidadVenta); //LlenarCombos.Ejecutivos(this.lstPersonal); LlenarCombos.AgenciasTodas(this.lstAgenciasTrasbordo); LlenarCombos.AgenciasTodas(this.lstAgenciasOrigen); LlenarCombos.AgenciasTodas(this.lstAgenciasDestino); }
private void Page_Load(object sender, System.EventArgs e) { if (User.Identity.IsAuthenticated) { //this.SetCultura(); string sOpcion = ""; if (this.Request.QueryString["Tipo"] == "Costo") { sOpcion = "tarifarioCostoRedespacho"; } else { sOpcion = "tarifarioVentaRedespacho"; } Menu oMenu = (Menu)this.FindControl("Menu1"); this.ValidarSeguridad(oMenu, sOpcion); } Page.RegisterStartupScript("init", SisPackController.GenerarJavaScripts.SetearFocoControl(this.txtTarifarioDescrip.ClientID)); Session["valorizacion"] = ddlValorizacion.SelectedIndex > 0 ? ddlValorizacion.SelectedIndex : 0; this.phValidTarifarioDescrip.Controls.Add(GenerarValidadores.DescripcionTarifario("txtTarifarioDescrip", this.TraducirTexto("Errores.Invalidos.TarifarioDescrip"), true, "valDescrip")); if (!IsPostBack) { LlenarCombos.ValorizacionTarifario(ddlValorizacion, this.TraducirTexto("Combos.Todos"), this.UnidadNegocioID); if (this.Request.QueryString["Tipo"] == "Costo") { this.lblTituloPagina.Text = this.TraducirTexto("Tarifarios Costo Redespacho"); } else { this.lblTituloPagina.Text = this.TraducirTexto("Tarifarios Venta Redespacho"); } this.BindGrid(0); } }
private void Page_Load(object sender, System.EventArgs e) { if (User.Identity.IsAuthenticated) { //this.SetCultura(); string sOpcion = "tipoTarif" + this.Request.QueryString["TipoTarifario"]; Menu oMenu = (Menu)this.FindControl("Menu1"); this.ValidarSeguridad(oMenu, sOpcion); } Page.RegisterStartupScript("init", SisPackController.GenerarJavaScripts.SetearFocoControl(this.txtTarifarioDescrip.ClientID)); tipoTarifario = this.Request.QueryString["TipoTarifario"]; if (tipoTarifario == "Agencia") { this.lblTituloPagina.Text = TraducirTexto("Titulo.BusquedaTarifariosGrales"); } else if (tipoTarifario == "Cliente") { this.lblTituloPagina.Text = TraducirTexto("Titulo.BusquedaTarifariosPartZonas"); this.dtgTarifarios.Columns[1].Visible = false; } else { this.lblTituloPagina.Text = TraducirTexto("Titulo.BusquedaTarifariosEst"); this.dtgTarifarios.Columns[1].Visible = false; } this.phValidTarifarioDescrip.Controls.Add(GenerarValidadores.DescripcionTarifario("txtTarifarioDescrip", this.TraducirTexto("Errores.Invalidos.TarifarioDescrip"), true, "valDescrip")); if (!IsPostBack) { this.BindGrid(0); LlenarCombos.ValorizacionTarifario(ddlValorizacion, this.TraducirTexto("Combos.Todos"), this.UnidadNegocioID); } else { BindGrid(dtgTarifarios.CurrentPageIndex); } }
private void LlenarListas() { LlenarFechas(); LlenarUsuariosCall(); //LlenarCombos.Producto(this.lstProductos, this.UnidadNegocioID); //LlenarCombos.TiempoEntrega(this.lstTiemposEntrega, this.UnidadNegocioID); ////LlenarCombos.Servicio(this.lstServicios, this.UnidadNegocioID); //LlenarCombos.Servicio(this.lstServicios, this.TraducirTexto("Combos.SinServicioAdicional"), this.UnidadNegocioID); //LlenarCombos.ModalidadEntrega(this.lstModalidadesEntrega, this.UnidadNegocioID); LlenarCombos.ObservacionesTipificadas(this.lstObservaciones); LlenarCombos.AgenciasOrigenAgencia(this.lstAgOrigen, this.UnidadNegocioID); LlenarCombos.AgenciasOrigenAgencia(this.lstAgTransbordo, this.UnidadNegocioID); //LlenarCombos.AgenciasDestinoPuntosRecepcion(this.lstAgDestino, this.UnidadNegocioID); LlenarCombos.AgenciasDestinoPuntosRecepcionUtilizados(this.lstAgDestino, this.UnidadNegocioID); LlenarCombos.UnidadesVenta(this.lstUnidadesVenta); LlenarCombos.ImpactosAll(lstImpactoObs, "Sin Impacto"); if (this.usuario.ClienteID == 0) { //LlenarCombos.Clientes(this.lstClientes, this.TraducirTexto("Combos.ClientesEventuales"), this.UnidadNegocioID); LlenarCombos.ClientesConCodigo(this.lstClientes, "Clientes Eventuales", this.UnidadNegocioID); } else { ICliente cliente = ClienteFactory.GetCliente(); cliente.ClienteID = this.usuario.ClienteID; this.lstClientes.DataSource = cliente.GetClienteOne(); this.lstClientes.DataTextField = "RazonSocial"; this.lstClientes.DataValueField = "ClienteID"; this.lstClientes.DataBind(); this.lstClientes.SelectedIndex = 0; this.chkClientesTodos.Checked = true; this.chkClientesTodos.Enabled = false; this.lstClientes.Attributes.Add("onblur", "window.document.getElementById('chkClientesTodos').checked=true;ChangeClienteTodos();"); } }
private int DevuelveGuiaID(string guia) { try { if (guia.Length == 10) { string tipoGuia = ""; // tipoGuia = tipoGuia == "3" ? "A" : "B"; tipoGuia = NegociosSisPackInterface.SisPack.TipoGuia(guia.Substring(0, 1)); string nroSucursalGuia = guia.Substring(1, 4); string nroGuia = guia.Substring(5, guia.Length - 5); return(LlenarCombos.GuiaID(tipoGuia, nroSucursalGuia, Utiles.Validaciones.obtieneEntero(nroGuia))); } else { return(0); } } catch (Exception ex) { ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message); return(-1); } }
private void LlenarListas() { if (this.usuario.ClienteID == 0) { LlenarCombos.ClientesConCodigo(this.lstClientes, this.TraducirTexto("Combos.ClientesEventuales"), this.UnidadNegocioID); } else { ICliente cliente = ClienteFactory.GetCliente(); cliente.ClienteID = this.usuario.ClienteID; this.lstClientes.DataSource = cliente.GetClienteOne(); this.lstClientes.DataTextField = "RazonSocial"; this.lstClientes.DataValueField = "ClienteID"; this.lstClientes.DataBind(); this.lstClientes.SelectedIndex = 0; this.chkClientesTodos.Checked = true; this.chkClientesTodos.Enabled = false; this.lstClientes.Attributes.Add("onblur", "window.document.getElementById('chkClientesTodos').checked=true;ChangeClienteTodos();"); } //LlenarCombos.AgenciasDestinoPuntosRecepcion(this.lstAgDestino, this.UnidadNegocioID); LlenarCombos.AgenciasDestinoPuntosRecepcionUtilizados(this.lstAgDestino, this.UnidadNegocioID); LlenarCombos.AgenciaOrigenFlete(lstAgOrigen, UnidadNegocioID); LlenarCombos.EmpresaTerceros(lstEmpresa); }
private void LlenarCombo() { // llenos los combos relacionados con la unidad de venta if (ddlProducto.Items.Count == 0) { LlenarCombos.UnidadVentaProductosDisponiblesAgencia(this.ddlProducto, this.TraducirTexto("Combos.ElijaProducto"), 1); //this.AgenciaConectadaID } // llena el tiempo de entrega string script = "<script language='javascript'>BindTiempoEntrega();</script>"; Page.RegisterStartupScript("BindTiempoEntregaCall", script); SisPackController.LlenarCombos.LlenarStringUnidadVentaTiemposEntregaByProductoAgencia(this.txtTiempoEntrega, 1); //this.UnidadNegocioID // llena servicios SisPackController.LlenarCombos.LlenarStringUnidadVentaServiciosTEntregaProductoAgencia(this.txtServicio, 1); //this.UnidadNegocioID //SisPackController.LlenarCombos.LlenarStringUnidadVentaModalidadesEntrega(this.txtModalidadEntrega,1);//this.UnidadNegocioID SisPackController.LlenarCombos.Provincia(this.ddlProvincia, this.TraducirTexto("Combos.ElijaProvincia")); script = "<script language='javascript'>BindLocalidad();</script>"; Page.RegisterStartupScript("Bind" + this.ID, script); SisPackController.LlenarCombos.LlenarStringLocalidades(this.txtLocalidades); }
private void LlenarListas() { LlenarFechas(); LlenarCombos.Producto(this.lstProductos, this.UnidadNegocioID); this.lstProductos.SelectedIndex = 0; LlenarCombos.TiempoEntrega(this.lstTiemposEntrega, this.UnidadNegocioID); this.lstTiemposEntrega.SelectedIndex = 0; LlenarCombos.Servicio(this.lstServicios, this.TraducirTexto("Combos.SinServicioAdicional"), this.UnidadNegocioID); ListItem item = this.lstServicios.Items[0]; item.Value = "0"; this.lstServicios.SelectedIndex = 0; LlenarCombos.ModalidadEntrega(this.lstModalidadesEntrega, this.UnidadNegocioID); this.lstModalidadesEntrega.SelectedIndex = 0; LlenarCombos.AgenciasOrigen(this.lstAgOrigen, this.UnidadNegocioID); this.lstAgOrigen.SelectedIndex = 0; LlenarCombos.AgenciasDestino(this.lstAgDestino, this.UnidadNegocioID); this.lstAgDestino.SelectedIndex = 0; LlenarCombos.ClientesCombos(this.lstClientes, this.UnidadNegocioID); this.lstClientes.Items[0].Selected = false; this.lstClientes.SelectedIndex = 0; LlenarCombos.CategoriaServicios(ddlServiciosTransporte); this.ddlServiciosTransporte.SelectedIndex = 0; }
private void CargarCombos() { LlenarCombos.UnidadesLogisticas(ddlUnidades, ""); }
private void CargarCombos() { LlenarCombos.ParadaDestino(this.ddlParadaDestino, "Elija el destino", this.UnidadNegocioID, this.AgenciaConectadaID); }
private void CargarCombos() { LlenarCombos.ValorizacionTarifario(ddlValorizacion, this.TraducirTexto("Combos.ElijaValorizacionTarifario"), this.UnidadNegocioID); LlenarCombos.TarifarioReferencia(ddlTarifarioReferencia, this.TraducirTexto("Combos.TarifarioReferencia"), this.UnidadNegocioID, "RE"); LlenarCombos.LlenarStringTarifariosValorizacion(txtTarifariosValorizacion, this.UnidadNegocioID, "RE"); }
private void CargarUnidadesVentas() { SisPackController.LlenarCombos.UnidadesVentas(this.ddlUnidadVenta, this.TraducirTexto("Combos.Todos")); LlenarCombos.CategoriaUVenta(this.ddlCategoriasUVenta, "Todas"); }
private void ConsultarHojaRuta() { IHojaRuta hojaRuta = HojaRutaFactory.GetHojaRuta(); hojaRuta.HojaRutaID = Convert.ToInt32(this.txtHojaRutaID.Text); ds = hojaRuta.Consultar(); // SFE_Revisar //Llenar datos de la cabecera //this.ddlLineaTransporte.SelectedValue = hojaRuta.oServicioTransporte.oLineaTransporte.LineaTransporteID.ToString(); servicioTransporteID = hojaRuta.oServicioTransporte.ServicioTransporteID; //this.txtServicioTransporteSel.Text = hojaRuta.oServicioTransporte.ServicioTransporteID.ToString(); fechaHojaRuta = hojaRuta.Fecha; //this.txtHoraCabecera.Text = hojaRuta.HoraCabecera; this.txtNroHojaRuta.Text = hojaRuta.NroHojaRuta.ToString(); //this.txtNroHojaRuta.ReadOnly = true; //this.txtParadaDescrip.Text = hojaRuta.ParadaDescripDestino; this.txtEstadoHojaRuta.Text = ((NegociosSisPackInterface.SisPack.EstadoHojaRuta)hojaRuta.EstadoHojaRutaID).ToString(); if (this.ddlParada.Items.Count <= 1) { LlenarCombos.ParadaRecorrido(this.ddlParada, "Seleccione la parada", Convert.ToInt32(servicioTransporteID), this.AgenciaConectadaID); } Session["HojaRutaColectora"] = ds; Session["HR"] = hojaRuta; switch (hojaRuta.EstadoHojaRutaID) { case NegociosSisPackInterface.SisPack.EstadoHojaRuta.Emitida: //Está emitida cuando ya se ha generado, es el estado inicial //bloquear los controles que no se puedan modificar // SFE_Revisar //this.ddlLineaTransporte.Enabled = false; //this.ddlParadaDestino.Enabled = false; //this.ddlServicioTransporte.Enabled = false; //this.txtFechaHojaRuta.ReadOnly = true; //this.txtFechaHojaRuta.Enabled = false; //this.txtHoraCabecera.ReadOnly = true; //this.txtParadaDescrip.ReadOnly = true; //this.busqChofer.SoloLectura = "N"; //this.trBuscar.Visible = true; //this.butVerRecorrido.Enabled = false; break; case NegociosSisPackInterface.SisPack.EstadoHojaRuta.Confirmada: // SFE_Revisar //this.SetearConfirmada(); //this.trBuscar.Visible = false; //Está Confirmada cuando la hoja de ruta no puede modificarse, es decir, va en viaje, //no se puede modificar más break; case NegociosSisPackInterface.SisPack.EstadoHojaRuta.Anulada: // La hoja de ruta esta anulada y no puede modificarse // SFE_Revisar //SetearAnulada(); //this.trBuscar.Visible = false; break; } BindData(true); }
private void LlenarListas() { //LlenarCombos.AgenciasOrigenSeguimiento(this.lstAgencia, this.UnidadNegocioID); LlenarCombos.AgenciasSeguimiento(this.lstAgencia, this.UnidadNegocioID); }
private void LlenarListas() { dtAgencias = LlenarCombos.AgenciasHabilitadas(this.lstAgencia, this.UnidadNegocioID); dtPuntosRecepcion = LlenarCombos.PuntosRecepcion(this.lstPuntoRecepcion, this.UnidadNegocioID); }
private void CargarCombos() { //LlenarCombos.ParadaDestino(this.ddlParada, "Elija el destino", this.UnidadNegocioID, this.AgenciaConectadaID); LlenarCombos.ParadaDestino(this.ddlParada, "Seleccione la parada", servicioTransporteID, this.AgenciaConectadaID); LlenarCombos.TipoParada(this.ddlTipoParada, "", this.UnidadNegocioID); }
public void CargarCombos() { LlenarCombos.ProvinciaLst(lstProvincias); }
private void LlenarListaZonas() { LlenarCombos.ZonasByUsuario(ddlZonaOrigen, "Elija Zona", usuario.UsuarioID); LlenarCombos.ZonasByUsuario(ddlZonaDestino, "Elija Zona", usuario.UsuarioID); }
private void Page_Load(object sender, System.EventArgs e) { string uVta = this.Request.QueryString["UVtaID"]; string modEnt = this.Request.QueryString["ModEntrega"]; string agConectada = this.Request.QueryString["AgID"]; string provID = this.Request.QueryString["ProvID"]; string locID = this.Request.QueryString["LocID"]; string localidadesAutorizacion = this.Request.QueryString["LocalidadesAutorizacion"]; Hashtable hAgencia; Hashtable hLoc; Hashtable hProv; if (CacheDataManager.GetCacheValue("hProv") != null) { hProv = (Hashtable)CacheDataManager.GetCacheValue("hProv"); } else { hProv = new Hashtable(); } if (CacheDataManager.GetCacheValue("hLoc") != null) { hLoc = (Hashtable)CacheDataManager.GetCacheValue("hLoc"); } else { hLoc = new Hashtable(); } if (CacheDataManager.GetCacheValue("hAgencia") != null) { hAgencia = (Hashtable)CacheDataManager.GetCacheValue("hAgencia"); } else { hAgencia = new Hashtable(); } //System.Console.Write("1, Mendoza;2, San Juan;"); //Response.Write("1, Mendoza;2, San Juan;"); //Response.ContentType = "text/plain"; //Response.Write("1, Mendoza;2, San Juan;|"); // probando.... if (uVta != null && modEnt != null) { string datos = ""; // if (uVta != null) //Quiere decir que son las solicitudes del control de Unidad de venta y destino { IAdministrarGuias oAdminGuias = AdministrarGuiasFactory.GetAdministrarGuias(); DsDestinosGuias ds = oAdminGuias.GetUVentaDestinosGuiasDataSet(); //string datos = ""; if (provID == null && locID == null) //Se quieren cargar las provincias { if (hProv.Contains(agConectada + "#" + uVta + "#" + modEnt)) { datos = hProv[agConectada + "#" + uVta + "#" + modEnt].ToString(); } else { DsDestinosGuias.DatosRow[] dRows = (DsDestinosGuias.DatosRow[])ds.Datos.Select("AgenciaID <> " + agConectada + " AND UnidadVentaID = " + uVta + "AND ModalidadEntregaID = " + modEnt, "ProvinciaDescrip"); datos = "0,Elija provincia;"; if (dRows != null) { foreach (DsDestinosGuias.DatosRow dr in dRows) { //string nuevoDato = dr.UnidadVentaID + "," + dr.ModalidadEntregaID +","+ dr.ProvinciaID + "," + dr.ProvinciaDescrip + "," + dr.LocalidadID + "," + dr.LocalidadDescrip +","+ dr.AgenciaID + "," + dr.RazonSocial + "," + dr.Nombre + ";"; string nuevoDato = dr.ProvinciaID + "," + dr.ProvinciaDescrip + ";"; if (datos.IndexOf(nuevoDato) < 0) { datos += nuevoDato; } } } hProv.Add(agConectada + "#" + uVta + "#" + modEnt, datos); CacheDataManager.SetCacheValue("hProv", hProv); } } else if (provID != null && locID == null) //Se quieren cargar las localidades { if (hLoc.Contains(agConectada + "#" + uVta + "#" + modEnt + "#" + provID + "#" + localidadesAutorizacion.Replace(",", "#"))) { datos = hLoc[agConectada + "#" + uVta + "#" + modEnt + "#" + provID + "#" + localidadesAutorizacion.Replace(",", "#")].ToString(); } else { DsDestinosGuias.DatosRow[] dRows; if (localidadesAutorizacion != null && localidadesAutorizacion.Length > 0) { //original //dRows = (DsDestinosGuias.DatosRow[]) ds.Datos.Select("AgenciaID <> " + agConectada + " AND UnidadVentaID = " + uVta + "AND ModalidadEntregaID = "+modEnt+" AND ProvinciaID = " + provID + " AND LocalidadID IN (" + localidadesAutorizacion + ")","LocalidadDescrip"); dRows = (DsDestinosGuias.DatosRow[])ds.Datos.Select("AgenciaID <> " + agConectada + " AND UnidadVentaID = " + uVta + "AND ModalidadEntregaID = " + modEnt + " AND ProvinciaID = " + provID + " AND LocalidadID IN (" + localidadesAutorizacion + ") AND (NoRestringirAgenciasVisualizacion = 1 OR (AgenciaVisualiza = -1 OR AgenciaVisualiza = " + agConectada + "))", "LocalidadDescrip"); } else { dRows = (DsDestinosGuias.DatosRow[])ds.Datos.Select("AgenciaID <> " + agConectada + " AND UnidadVentaID = " + uVta + "AND ModalidadEntregaID = " + modEnt + " AND ProvinciaID = " + provID + " AND (NoRestringirAgenciasVisualizacion = 1 OR (AgenciaVisualiza = -1 OR AgenciaVisualiza = " + agConectada + "))", "LocalidadDescrip"); } datos = "0,Elija localidad;"; if (dRows != null) { foreach (DsDestinosGuias.DatosRow dr in dRows) { //string nuevoDato = dr.UnidadVentaID + "," + dr.ModalidadEntregaID +","+ dr.ProvinciaID + "," + dr.ProvinciaDescrip + "," + dr.LocalidadID + "," + dr.LocalidadDescrip +","+ dr.AgenciaID + "," + dr.RazonSocial + "," + dr.Nombre + ";"; string nuevoDato = dr.LocalidadID + "," + dr.LocalidadDescrip + ";"; if (datos.IndexOf(nuevoDato) < 0) { datos += nuevoDato; } } hLoc.Add(agConectada + "#" + uVta + "#" + modEnt + "#" + provID + "#" + localidadesAutorizacion.Replace(",", "#"), datos); CacheDataManager.SetCacheValue("hLoc", hLoc); } } } else if (locID != null) //Se quieren cargar las agencias { // datos = "0,Elija la localidad ;"; //foreach(DsAgencias.DatosRow dr in dRows) if (hAgencia.Contains(agConectada + "#" + uVta + "#" + modEnt + "#" + locID)) { datos = hAgencia[agConectada + "#" + uVta + "#" + modEnt + "#" + locID].ToString(); } else { //DsAgencias dsA = oAdminGuias.GetAgenciasPuntoRecepcionByLocalidad(Utiles.Validaciones.obtieneEntero(locID)); DsDestinosGuias dsA = oAdminGuias.GetAgenciasPuntoRecepcionByLocalidad(Utiles.Validaciones.obtieneEntero(locID), Utiles.Validaciones.obtieneEntero(agConectada)); //FALTA FILTRAR QUE SOLO TRAIGA LAS QUE CORRESPONDEN A LA UNIDAD DE VENTA //DsAgencias.DatosRow[] dRows = (DsAgencias.DatosRow[]) dsA.Datos.Select("AgenciaID <> " + agConectada,"Nombre"); DsDestinosGuias.DatosRow[] dRows = (DsDestinosGuias.DatosRow[])dsA.Datos.Select("AgenciaID <> " + agConectada + " AND UnidadVentaID = " + uVta + "AND ModalidadEntregaID = " + modEnt + " AND LocalidadID = " + locID, "Nombre"); //Agregamos aqui un '"";' if (dRows != null) { foreach (DsDestinosGuias.DatosRow dr in dRows) { //string nuevoDato = dr.UnidadVentaID + "," + dr.ModalidadEntregaID +","+ dr.ProvinciaID + "," + dr.ProvinciaDescrip + "," + dr.LocalidadID + "," + dr.LocalidadDescrip +","+ dr.AgenciaID + "," + dr.RazonSocial + "," + dr.Nombre + ";"; string nuevoDato = dr.AgenciaID + "," + dr.Nombre + ";"; if (datos.IndexOf(nuevoDato) < 0) { datos += nuevoDato; } } hAgencia.Add(agConectada + "#" + uVta + "#" + modEnt + "#" + locID, datos); CacheDataManager.SetCacheValue("hAgencia", hAgencia); } } /*DsDestinosGuias.DatosRow[] dRows = (DsDestinosGuias.DatosRow[]) ds.Datos.Select("AgenciaID <> " + agConectada + " AND UnidadVentaID = " + uVta + "AND ModalidadEntregaID = "+modEnt+" AND LocalidadID = " + locID,"Nombre"); * //Agregamos aqui un '"";' * if (dRows!= null) * { * // datos = "0,Elija la localidad ;"; * foreach(DsDestinosGuias.DatosRow dr in dRows) * { * //string nuevoDato = dr.UnidadVentaID + "," + dr.ModalidadEntregaID +","+ dr.ProvinciaID + "," + dr.ProvinciaDescrip + "," + dr.LocalidadID + "," + dr.LocalidadDescrip +","+ dr.AgenciaID + "," + dr.RazonSocial + "," + dr.Nombre + ";"; * string nuevoDato = dr.AgenciaID + "," + dr.Nombre + ";"; * if (datos.IndexOf(nuevoDato) < 0) * datos += nuevoDato; * } * }*/ } } datos += "#"; Response.Write(datos); } else //Viene del control de domicilio { string datos = ""; datos = "0,Elija localidad;"; if (provID != null) { datos = LlenarCombos.LlenarStringLocalidades(Convert.ToInt32(provID)); } datos += "#"; Response.Write(datos); } }
protected void ConsultarZonasOrigen() { LlenarCombos.Zonas(this.lstZonasOrigen, UnidadNegocioID); }
private void llenarCombos() { LlenarCombos.UnidadesVentas(this.ddlUnidadVenta, "Todas"); LlenarCombos.ModalidadEntrega(this.ddlModEntrega, usuario.UnidadNegocioID, "Todas"); }