Example #1
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            AddDesignation frm = new AddDesignation(this);

            frm.lblid.Visible     = false;
            frm.btnupdate.Enabled = false;
            frm.Show();
        }
Example #2
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string colName = dataGridView1.Columns[e.ColumnIndex].Name;

            if (colName == "Edit")
            {
                AddDesignation frm = new AddDesignation(this);
                frm.btnsav.Enabled      = false;
                frm.lblid.Visible       = false;
                frm.lblid.Text          = dataGridView1[1, e.RowIndex].Value.ToString();
                frm.txtdesignation.Text = dataGridView1[2, e.RowIndex].Value.ToString();
                frm.txtdesc.Text        = dataGridView1[3, e.RowIndex].Value.ToString();
                frm.ShowDialog();
            }
        }