Example #1
0
 private void addBtn_Click(object sender, EventArgs e)
 {
     using (FrmKategori kategoriForm = new FrmKategori())
     {
         kategoriForm.IsEdit = false;
         kategoriForm.ShowDialog();
     }
     recordLoad();
 }
Example #2
0
 private void editBtn_Click(object sender, EventArgs e)
 {
     using (FrmKategori kategoriForm = new FrmKategori())
     {
         foreach (DataGridViewRow row in dataGridView1.SelectedRows)
         {
             kategoriForm.PrimaryKey       = row.Cells[0].Value.ToString();
             kategoriForm.kategoriTxt.Text = row.Cells[1].Value.ToString();
             kategoriForm.IsEdit           = true;
         }
         kategoriForm.ShowDialog();
     }
     recordLoad();
 }