Beispiel #1
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)
            { }
        }
Beispiel #2
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); }
        }
Beispiel #3
0
 public void SetItemContrato()
 {
     try
     {
         CONT_Numero.SetValue(Presenter.ItemContrato, Presenter.ItemContrato.CONT_Numero);
         CONT_Descrip.Text = Presenter.ItemContrato.CONT_Descrip;
         TIPO_CodPAIOrigen.TiposSelectedValue = Presenter.ItemContrato.TIPO_CodPaisOrigen;
         if (Presenter.ItemContrato.PUER_CodigoOrigen.HasValue)
         {
             PUER_CodOrigen.ComboIntSelectedValue = Presenter.ItemContrato.PUER_CodigoOrigen.Value;
         }
         TIPO_CodPAIDestino.TiposSelectedValue = Presenter.ItemContrato.TIPO_CodPaisDestino;
         if (Presenter.ItemContrato.PUER_CodigoDestino.HasValue)
         {
             PUER_CodDestino.ComboIntSelectedValue = Presenter.ItemContrato.PUER_CodigoDestino.Value;
         }
     }
     catch (Exception)
     { }
 }