예제 #1
0
 private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     DataGridViewRow dr = dataGridView1.SelectedRows[0];
     this.Hide();
     frmCategory frm = new frmCategory();
     // or simply use column name instead of index
     //dr.Cells["id"].Value.ToString();
     frm.Show();
     frm.txtID.Text = dr.Cells[0].Value.ToString();
     frm.txtCategoryName.Text = dr.Cells[1].Value.ToString();
     frm.btnDelete.Enabled = true;
     frm.btnUpdate.Enabled = true;
     frm.txtCategoryName.Focus();
     frm.btnSave.Enabled = false;
 }
 private void categoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmCategory frm = new frmCategory();
     frm.Show();
 }
예제 #3
0
 private void frmCategoryRecord_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.Hide();
     frmCategory frm = new frmCategory();
     frm.Show();
 }