Пример #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myWindow = ((Semana6.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.btnCerrar = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
        private void Categoria_Seleccionada(object sender, SelectionChangedEventArgs e)
        {
            var item = (Categoria)dgvCategoria.SelectedItem;

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

            manCategoria.ShowDialog();
        }