Example #1
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            AddDivision frm = new AddDivision(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")
            {
                AddDivision frm = new AddDivision(this);
                frm.btnsav.Enabled       = false;
                frm.lblid.Visible        = false;
                frm.lblid.Text           = dataGridView1[1, e.RowIndex].Value.ToString();
                frm.txtdivisionname.Text = dataGridView1[2, e.RowIndex].Value.ToString();
                frm.txtaddress.Text      = dataGridView1[3, e.RowIndex].Value.ToString();
                frm.txtvision.Text       = dataGridView1[4, e.RowIndex].Value.ToString();
                frm.txtmission.Text      = dataGridView1[5, e.RowIndex].Value.ToString();
                frm.txtgoals.Text        = dataGridView1[6, e.RowIndex].Value.ToString();
                frm.txthyhm.Text         = dataGridView1[7, e.RowIndex].Value.ToString();
                frm.ShowDialog();
            }
        }
 public void OnAdd_Division(ICalculatorComponent calculator)
 {
     AddDivision?.Invoke(calculator);
 }