Example #1
0
        /// <summary>
        /// CRISTHIAN JOSE APAZA
        /// NAVE SEGUN TRANSPORTISTA
        /// </summary>
        private void ENTC_CodTransportista_AyudaValueChanged(object sender, EventArgs e)
        {
            if (ayudaENTC_CodTransportista.Value != null)
            {
                cmbNAVE_Codigo.Enabled = true;

                Presenter.ItemsNaveUnTransportista = Presenter.ItemsNave.Where(Trans => Trans.ENTC_CodTransportista == ayudaENTC_CodTransportista.Value.ENTC_Codigo).ToObservableCollection();
                Presenter.ItemTransportista        = ayudaENTC_CodTransportista.Value;
                cmbNAVE_Codigo.ValueMember         = "NAVE_Codigo";
                cmbNAVE_Codigo.DisplayMember       = "NAVE_Nombre";

                Entities.Nave naveEmpty = new Entities.Nave();
                naveEmpty.NAVE_Codigo = -1;
                naveEmpty.NAVE_Nombre = "<Todos>";

                ObservableCollection <Entities.Nave> naves = Presenter.ItemsNaveUnTransportista;
                naves.Insert(0, naveEmpty);

                cmbNAVE_Codigo.DataSource = naves;
                //Presenter.Actualizar();
            }
            else
            {
                Presenter.ItemsNaveUnTransportista = new ObservableCollection <Entities.Nave>();
                Presenter.ItemTransportista        = null;
                cmbNAVE_Codigo.DataSource          = null;
                cmbNAVE_Codigo.Enabled             = false;
            }
        }
Example #2
0
        private void ShowComboNaves()
        {
            NAVE_Codigo.ValueMember   = "NAVE_Codigo";
            NAVE_Codigo.DisplayMember = "NAVE_Nombre";

            Entities.Nave naveEmpty = new Entities.Nave();
            naveEmpty.NAVE_Codigo = -1;
            naveEmpty.NAVE_Nombre = "<Todos>";
            ObservableCollection <Entities.Nave> naves = Presenter.ItemsNave;

            naves.Insert(0, naveEmpty);
            NAVE_Codigo.DataSource = naves;

            NAVE_Codigo.Text             = String.Empty; NAVE_Codigo.AutoCompleteSource = AutoCompleteSource.ListItems;
            NAVE_Codigo.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
        }