private void btnCreate_Click(object sender, EventArgs e) { PhoneShop fr = new PhoneShop(); fr.ShowDialog(); Product((int)cbxhangsx.SelectedValue); ShowList(); }
private void btnUpdate_Click(object sender, EventArgs e) { if (listview.SelectedRows.Count == 1) { var row = listview.SelectedRows[0]; var cell = row.Cells["ID"]; int ID = (int)cell.Value; PhoneShop edit = new PhoneShop(ID); edit.ShowDialog(); Product((int)cbxhangsx.SelectedValue); ShowList(); } }