예제 #1
0
 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);
     }
 }
예제 #2
0
 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();
 }
예제 #3
0
 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();
 }
예제 #4
0
 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;
 }