Esempio n. 1
0
        private void btnTambah_Click(object sender, EventArgs e)
        {
            FrmTambahData ftm = new FrmTambahData(true);

            ftm.Run(ftm);
            FrmAddressBook_Load(null, null);
        }
Esempio n. 2
0
        private void btnTambah_Click(object sender, EventArgs e)
        {
            FrmTambahData form = new FrmTambahData(true);

            form.Run(form);

            addr.loadData(this.dgvData, this.lblBanyakRecordData);
        }
Esempio n. 3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            AddressController controller = new AddressController();
            FrmTambahData     ftm        = new FrmTambahData(false, people(temp));

            ftm.Run(ftm);
            FrmAddressBook_Load(null, null);
        }
Esempio n. 4
0
        private void btnTambah_Click(object sender, EventArgs e)
        {
            FrmTambahData frm = new FrmTambahData(true);

            this.Hide();
            frm.ShowDialog();

            this.Show();
            FrmAddressBook_Load(null, null);
        }
Esempio n. 5
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (this.dgvData.SelectedRows.Count > 0)
     {
         DataGridViewRow row      = this.dgvData.SelectedRows[0];
         AddressBook     addrBook = new AddressBook();
         addrBook.Nama         = row.Cells[0].Value.ToString();
         addrBook.Alamat       = row.Cells[1].Value.ToString();
         addrBook.Kota         = row.Cells[2].Value.ToString();
         addrBook.NoHp         = row.Cells[3].Value.ToString();
         addrBook.TanggalLahir = Convert.ToDateTime(row.Cells[4].Value).Date;
         addrBook.Email        = row.Cells[5].Value.ToString();
         FrmTambahData form = new FrmTambahData(false, addrBook);
         if (form.Run(form))
         {
             FrmAddressBook_Load(null, null);
         }
     }
 }
Esempio n. 6
0
 bool _addMode         = false;//true = add Item, false = edit item
 public bool Run(FrmTambahData form)
 {
     form.ShowDialog();
     return(_result);
 }