示例#1
0
        private void Deshacer()
        {
            try
            {
                BSItems.DataSource     = null;
                grdItems.DataSource    = BSItems;
                grdItems.Enabled       = false;
                navItems.BindingSource = BSItems;
                BSItems.ResetBindings(true);

                grdItems.Enabled    = true;
                btnNuevo.Enabled    = true;
                btnBuscar.Enabled   = true;
                btnExportar.Enabled = false;

                cmbCONS_CodRGM.SelectedIndex = 0;
                cmbCONS_CodVia.SelectedIndex = 0;
                ENTC_CodTransportista.ClearValue();;
                mdtNVIA_FecCreacion.NSFecha = null;
                //NAVE_Codigo.DataSource = null;
                NAVE_Codigo.SelectedIndex = 0;
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al deshacer la vista.", ex); }
        }
示例#2
0
        public void SetItem()
        {
            try
            {
                CONT_Codigo.Text = Presenter.Item.CONT_Codigo.ToString();
                //CONT_Activo.Checked = Presenter.Item.CONT_Activo;
                CONT_Numero.Text    = Presenter.Item.CONT_Numero;
                CONT_FecEmi.NSFecha = Presenter.Item.CONT_FecEmi;
                CONT_Descrip.Text   = Presenter.Item.CONT_Descrip;
                CONT_FecIni.NSFecha = Presenter.Item.CONT_FecIni;
                CONT_FecFin.NSFecha = Presenter.Item.CONT_FecFin;

                if (Presenter.Item.ENTC_CodTransportista.HasValue)
                {
                    ENTC_CodTransportista.SetValue(Presenter.Item.ENTC_CodTransportista.Value);
                }
                if (Presenter.Item.ENTC_CodCliente.HasValue)
                {
                    ENTC_CodCliente.SetValue(Presenter.Item.ENTC_CodCliente.Value);
                }

                CONS_CodRGM.ConstantesSelectedValue = Presenter.Item.CONS_CodRGM;
                CONS_CodVia.ConstantesSelectedValue = Presenter.Item.CONS_CodVia;

                CONT_Numero.Select();

                HashFormulario = Infrastructure.Client.FormClose.FormValidateChanges.iniciarComparacionFormulario(this);
            }
            catch (Exception)
            { }
        }
示例#3
0
        private void Deshacer()
        {
            try
            {
                Presenter.LimpiarReporte();

                CONS_CodRGM.ConstantesSelectedValue = null;
                CONS_CodVIA.ConstantesSelectedValue = null;
                CONT_Fecha.NSFecha = null;
                PACK_Codigo.ComboIntSelectedValue = null;
                ENTC_CodTransportista.ClearValue();
                ENTC_CodTransportista.Text = string.Empty;
                CONT_Numero.ClearValue();
                CONT_Numero.Text  = string.Empty;
                CONT_Descrip.Text = string.Empty;

                TIPO_CodPAIOrigen.TiposSelectedValue  = null;
                TIPO_CodPAIDestino.TiposSelectedValue = null;

                BSItems.DataSource  = null;
                grdItems.DataSource = BSItems;
                BSItems.ResetBindings(true);

                grdItems.Enabled    = true;
                btnBuscar.Enabled   = true;
                btnExportar.Enabled = false;
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error al limpiar al reporte.", ex); }
        }
示例#4
0
        public void SetItem()
        {
            try
            {
                CONT_Numero.Text    = Presenter.Item.CONT_Numero;
                CONT_Descrip.Text   = Presenter.Item.CONT_Descrip;
                CONT_FecIni.NSFecha = Presenter.Item.CONT_FecIni;
                CONT_FecFin.NSFecha = Presenter.Item.CONT_FecFin;

                if (Presenter.Item.ENTC_CodTransportista.HasValue)
                {
                    ENTC_CodTransportista.SetValue(Presenter.Item.ENTC_CodTransportista.Value);
                }
                if (Presenter.Item.ENTC_CodCliente.HasValue)
                {
                    ENTC_CodCliente.SetValue(Presenter.Item.ENTC_CodCliente.Value);
                }

                CONS_CodRGM.ConstantesSelectedValue = Presenter.Item.CONS_CodRGM;
                CONS_CodVia.ConstantesSelectedValue = Presenter.Item.CONS_CodVia;

                TIPO_CodMnd.TiposSelectedValue      = Presenter.ItemTarifa.TIPO_CodMnd;
                CONS_CodBas.ConstantesSelectedValue = Presenter.ItemTarifa.CONS_CodBas;

                Entities.Puerto _puerto = null;
                _puerto = Presenter.ListPuertos.Where(puer => puer.PUER_Codigo == Presenter.ItemTarifa.PUER_CodOrigen).FirstOrDefault();
                if (_puerto != null)
                {
                    TIPO_CodPAIOrigen.TiposSelectedValue = _puerto.TIPO_CodPais;
                    PUER_CodOrigen.ComboIntSelectedValue = Presenter.ItemTarifa.PUER_CodOrigen;
                }
                _puerto = null;
                _puerto = Presenter.ListPuertos.Where(puer => puer.PUER_Codigo == Presenter.ItemTarifa.PUER_CodDestino).FirstOrDefault();
                if (_puerto != null)
                {
                    TIPO_CodPAIDestino.TiposSelectedValue = _puerto.TIPO_CodPais;
                    PUER_CodDestino.ComboIntSelectedValue = Presenter.ItemTarifa.PUER_CodDestino;
                }

                PACK_Codigo.ComboIntSelectedValue = Presenter.ItemTarifa.PACK_Codigo;

                TARI_Peso.Text    = Presenter.ItemTarifa.TARI_Peso.HasValue ? Presenter.ItemTarifa.TARI_Peso.Value.ToString() : "0.00";
                TARI_Volumen.Text = Presenter.ItemTarifa.TARI_Volum.HasValue ? Presenter.ItemTarifa.TARI_Volum.Value.ToString() : "0.00";
                TARI_Costo.Text   = Presenter.ItemTarifa.TARI_Costo.HasValue ? Presenter.ItemTarifa.TARI_Costo.Value.ToString() : "0.00";
                TARI_Profit1.Text = Presenter.ItemTarifa.TARI_Profit1.HasValue ? Presenter.ItemTarifa.TARI_Profit1.Value.ToString() : "0.00";
                TARI_Profit2.Text = Presenter.ItemTarifa.TARI_Profit2.HasValue ? Presenter.ItemTarifa.TARI_Profit2.Value.ToString() : "0.00";
                TARI_Profit3.Text = Presenter.ItemTarifa.TARI_Profit3.HasValue ? Presenter.ItemTarifa.TARI_Profit3.Value.ToString() : "0.00";
                TARI_Profit4.Text = Presenter.ItemTarifa.TARI_Profit4.HasValue ? Presenter.ItemTarifa.TARI_Profit4.Value.ToString() : "0.00";
                TARI_PVenta1.Text = Presenter.ItemTarifa.TARI_PVenta1.HasValue ? Presenter.ItemTarifa.TARI_PVenta1.Value.ToString() : "0.00";
                TARI_PVenta2.Text = Presenter.ItemTarifa.TARI_PVenta2.HasValue ? Presenter.ItemTarifa.TARI_PVenta2.Value.ToString() : "0.00";
                TARI_PVenta3.Text = Presenter.ItemTarifa.TARI_PVenta3.HasValue ? Presenter.ItemTarifa.TARI_PVenta3.Value.ToString() : "0.00";
                TARI_PVenta4.Text = Presenter.ItemTarifa.TARI_PVenta4.HasValue ? Presenter.ItemTarifa.TARI_PVenta4.Value.ToString() : "0.00";

                TARI_Costo.Select();

                HashFormulario = Infrastructure.Client.FormClose.FormValidateChanges.iniciarComparacionFormulario(this);
            }
            catch (Exception)
            { }
        }
示例#5
0
        public void ClearItem()
        {
            try
            {
                CONT_Numero.Text    = string.Empty;
                CONT_Numero.Text    = string.Empty;
                CONT_Descrip.Text   = string.Empty;
                CONT_FecFin.NSFecha = null;
                CONT_FecIni.NSFecha = null;
                ENTC_CodTransportista.ClearValue();
                ENTC_CodTransportista.Text = String.Empty;
                ENTC_CodCliente.ClearValue();
                ENTC_CodCliente.Text = String.Empty;
                CONS_CodRGM.ConstantesSelectedValue = null;
                CONS_CodVia.ConstantesSelectedValue = null;



                TIPO_CodMnd.TiposSelectedValue       = null;
                CONS_CodBas.ConstantesSelectedValue  = null;
                TIPO_CodPAIOrigen.TiposSelectedValue = null;
                //PUER_CodOrigen.ComboIntSelectedValue = null;
                TIPO_CodPAIDestino.TiposSelectedValue = null;
                //PUER_CodDestino.ComboIntSelectedValue = null;

                PACK_Codigo.ComboIntSelectedValue = null;

                TARI_Peso.Text    = "0.00";
                TARI_Volumen.Text = "0.00";
                TARI_Costo.Text   = "0.00";
                TARI_Profit1.Text = "0.00";
                TARI_Profit2.Text = "0.00";
                TARI_Profit3.Text = "0.00";
                TARI_Profit4.Text = "0.00";
                TARI_PVenta1.Text = "0.00";
                TARI_PVenta2.Text = "0.00";
                TARI_PVenta3.Text = "0.00";
                TARI_PVenta4.Text = "0.00";
            }
            catch (Exception)
            { }
        }
示例#6
0
 public void ClearItem()
 {
     try
     {
         CONT_Codigo.Text    = string.Empty;
         CONT_Activo.Checked = false;
         CONT_Numero.Text    = string.Empty;
         CONT_FecEmi.NSFecha = null;
         CONT_Descrip.Text   = string.Empty;
         CONT_FecFin.NSFecha = null;
         CONT_FecIni.NSFecha = null;
         ENTC_CodTransportista.ClearValue();
         ENTC_CodTransportista.Text = String.Empty;
         ENTC_CodCliente.ClearValue();
         ENTC_CodCliente.Text = String.Empty;
         CONS_CodRGM.ConstantesSelectedValue = null;
         CONS_CodVia.ConstantesSelectedValue = null;
     }
     catch (Exception)
     { }
 }