void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myWindow = ((Semana05.View.ManCategoria)(target));
                return;

            case 2:
                this.lblID = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.txtNombre = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.txtDescripcion = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.btnGrabar = ((System.Windows.Controls.Button)(target));
                return;

            case 6:
                this.btnEliminar = ((System.Windows.Controls.Button)(target));
                return;

            case 7:
                this.btnCerrar = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #2
0
        private void DgvCategoria_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            int idCategoria;
            var item = (Categoria)dgvCategoria.SelectedItem;

            if (null == item)
            {
                return;
            }
            idCategoria = Convert.ToInt32(item.IdCategoria);
            //Se coloca 0 porque es uno nuevo
            ManCategoria manCategoria = new ManCategoria();

            manCategoria.ShowDialog();
        }