Exemple #1
0
        private void departamentosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            cDepartamentos obj = new cDepartamentos();

            obj.MdiParent = this;
            obj.Show();
        }
        public override void Consultar()
        {
            cDepartamentos obj = new cDepartamentos();

            if (obj.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                int pos = obj.dataDepartamentos.CurrentCell.RowIndex;

                bCodigo.Text = obj.dataDepartamentos.Rows[pos].Cells[0].Value.ToString().Trim();

                //segunda forma
                bCodigo_Validating(null, null);
            }
            obj.Dispose();
        }