Esempio n. 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     PL.insertCustomer frm = new insertCustomer();
     frm.state = "add";
     frm.ShowDialog();
     this.metroGrid1.DataSource = customer.getCustomerInfo();
 }
Esempio n. 2
0
 private void btnModify_Click(object sender, EventArgs e)
 {
     PL.insertCustomer frm = new insertCustomer();
     frm.txtName.Text  = this.metroGrid1.CurrentRow.Cells[1].Value.ToString();
     frm.txtPhone.Text = this.metroGrid1.CurrentRow.Cells[2].Value.ToString();
     frm.UserID        = Convert.ToInt32(this.metroGrid1.CurrentRow.Cells[0].Value);
     frm.state         = "update";
     frm.ShowDialog();
     this.metroGrid1.DataSource = customer.getCustomerInfo();
 }