private void bttnAddNew_Click(object sender, EventArgs e) { FormMember_Modify.ADD_STATE = true; FormMember_Modify sForm = new FormMember_Modify(); sForm.ShowDialog(); }
private void bttnModify_Click(object sender, EventArgs e) { if (lvMember.Items.Count > 0) { try { FormMember_Modify.ADD_STATE = false; FormMember_Modify.sMemberKode = lvMember.Items[lvMember.FocusedItem.Index].SubItems[0].Text; FormMember_Modify sForm = new FormMember_Modify(); sForm.ShowDialog(); } catch (ArgumentOutOfRangeException aooreE) {} catch (NullReferenceException nreE) { } } else { MessageBox.Show("No record to edit.", clsVariables.sMSGBOX, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }