示例#1
0
        public void ClearItem()
        {
            try
            {
                txtCMBL_Numero.Text = String.Empty;
                cmbCONS_CodRGM.ConstantesSelectedValue = null;
                mdtCBML_FecEmi.NSFecha = null;
                //cmbTIPE_CodTransportista
                txaENTC_CodTransportista.Clear();
                txnCMBL_CantHijos.Value = (Decimal)0;
                txaPUER_Codigo.Clear();
                cmbTIPO_CodPAQ.TiposSelectedValue = null;
                txnCMBL_CantBultos.Value          = (Decimal)0.00;
                txnCMBL_PesoBruto.Value           = (Decimal)0.00;
                txnCMBL_Volumen.Value             = (Decimal)0.00;
                txtCMBL_Desc.Text          = String.Empty;
                txtCMBL_MarcasNumeros.Text = String.Empty;

                BSCab_Cotizacion_OV.DataSource = null;
                BSCab_Cotizacion_OV.ResetBindings(true);

                BSDet_CNTR.DataSource = null;
                BSDet_CNTR.ResetBindings(true);
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, Infrastructure.Aspect.Constants.Mensajes.ClearItem, ex); }
        }
示例#2
0
        public void SetItem()
        {
            try
            {
                txtCMBL_Numero.Text = Presenter.Item.CMBL_Numero;
                cmbCONS_CodRGM.ConstantesSelectedValue = Presenter.Item.CONS_CodRGM;
                mdtCBML_FecEmi.NSFecha = Presenter.Item.CBML_FecEmi;
                cmbTIPE_CodTransportista.ComboIntSelectedValue = Presenter.Item.TIPE_CodTransportista;
                if (Presenter.Item.ENTC_CodTransportista.HasValue)
                {
                    txaENTC_CodTransportista.SetValue(Presenter.Item.ENTC_CodTransportista.Value);
                }
                if (Presenter.Item.CMBL_CantHijos.HasValue)
                {
                    txnCMBL_CantHijos.Value = Presenter.Item.CMBL_CantHijos.Value;
                }
                txaPUER_Codigo.SelectedValue      = Presenter.Item.PUER_Codigo;
                cmbTIPO_CodPAQ.TiposSelectedValue = Presenter.Item.TIPO_CodPAQ;
                if (Presenter.Item.CMBL_CantBultos.HasValue)
                {
                    txnCMBL_CantBultos.Value = Presenter.Item.CMBL_CantBultos.Value;
                }
                if (Presenter.Item.CMBL_PesoBruto.HasValue)
                {
                    txnCMBL_PesoBruto.Value = Presenter.Item.CMBL_PesoBruto.Value;
                }
                if (Presenter.Item.CMBL_Volumen.HasValue)
                {
                    txnCMBL_Volumen.Value = Presenter.Item.CMBL_Volumen.Value;
                }
                txtCMBL_Desc.Text          = Presenter.Item.CMBL_Desc;
                txtCMBL_MarcasNumeros.Text = Presenter.Item.CMBL_MarcasNumeros;

                BSCab_Cotizacion_OV.DataSource = Presenter.Item.ListCab_Cotizacion_OV;
                BSCab_Cotizacion_OV.ResetBindings(true);

                SetDetCNTR();

                EnableItem(true);

                HashFormulario = Infrastructure.Client.FormClose.FormValidateChanges.iniciarComparacionFormulario(this);
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, Infrastructure.Aspect.Constants.Mensajes.SetItem, ex); }
        }