示例#1
0
 private void addBtn_Click(object sender, EventArgs e)
 {
     using (FrmSupp supp = new FrmSupp())
     {
         supp.IsEdit = false;
         supp.ShowDialog();
     }
     refreshBtn.PerformClick();
 }
示例#2
0
 private void editBtn_Click(object sender, EventArgs e)
 {
     using (FrmSupp supp = new FrmSupp())
     {
         supp.IsEdit = true;
         foreach (DataGridViewRow row in dataGridView1.SelectedRows)
         {
             supp.PrimaryKey       = row.Cells[0].Value.ToString();
             supp.nmSuppTXT.Text   = row.Cells[1].Value.ToString();
             supp.alamatTXT.Text   = row.Cells[2].Value.ToString();
             supp.kotaTXT.Text     = row.Cells[3].Value.ToString();
             supp.teleponTXT.Text  = row.Cells[4].Value.ToString();
             supp.emailTXT.Text    = row.Cells[5].Value.ToString();
             supp.nmKontakTXT.Text = row.Cells[6].Value.ToString();
         }
         supp.ShowDialog();
     }
     refreshBtn.PerformClick();
 }