Esempio n. 1
0
        private void EditarToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CategoriaBusiness ctr   = new CategoriaBusiness();
            CategoriaModel    model = new CategoriaModel();

            model.Id_Categoria = (int)DRG_Categoria.Rows[(int)DRG_Categoria.CurrentRow.Index].Cells[0].Value;



            ClassResult cr = ctr.Categoria_ConsUn(model);

            if (cr.Dt1.Rows.Count > 0)
            {
                DataRow row = cr.Dt1.Rows[0];
                txt_Nombre.Text      = row["Nombre"].ToString();
                txt_Descripcion.Text = row["Descripcion"].ToString();
                Id_Categoria         = Convert.ToInt32(row["Id_Categoria"].ToString());

                btn_cancelar.Visible = true;
            }
        }