private void FormProvEdit_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (DialogResult == DialogResult.OK) { return; } if (IsNew) { //UserPermissions.DeleteAllForProv(Providers.Cur.ProvNum); ProviderIdents.DeleteAllForProv(ProvCur.ProvNum); Providers.Delete(ProvCur); } }
private void FillProvIdent() { ProviderIdents.Refresh(); ListProvIdent = ProviderIdents.GetForProv(ProvCur.ProvNum); tbProvIdent.ResetRows(ListProvIdent.Length); tbProvIdent.SetGridColor(Color.Gray); for (int i = 0; i < ListProvIdent.Length; i++) { tbProvIdent.Cell[0, i] = ListProvIdent[i].PayorID; tbProvIdent.Cell[1, i] = ListProvIdent[i].SuppIDType.ToString(); tbProvIdent.Cell[2, i] = ListProvIdent[i].IDNumber; } tbProvIdent.LayoutTables(); }
private void butDelete_Click(object sender, System.EventArgs e) { if (tbProvIdent.SelectedRow == -1) { MessageBox.Show(Lan.g(this, "Please select an item first.")); return; } if (MessageBox.Show(Lan.g(this, "Delete the selected Provider Identifier?"), "", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } ProviderIdents.Delete(ListProvIdent[tbProvIdent.SelectedRow]); FillProvIdent(); }
private void butOK_Click(object sender, System.EventArgs e) { ProvIdentCur.PayorID = textPayorID.Text; ProvIdentCur.SuppIDType = (ProviderSupplementalID)listType.SelectedIndex; ProvIdentCur.IDNumber = textIDNumber.Text; if (IsNew) { ProviderIdents.Insert(ProvIdentCur); } else { ProviderIdents.Update(ProvIdentCur); } DialogResult = DialogResult.OK; }