private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { Payment pay = (Payment)gridMain.Rows[e.Row].Tag; Patient pat = Patients.GetOnePat(_arrayPats, pay.PatNum); Family fam = Patients.GetFamily(pat.PatNum); FormPayment FormP = new FormPayment(pat, fam, pay, false); FormP.ShowDialog(); RefreshPayments(); }
private void openPaymentToolStripMenuItem_Click(object sender, EventArgs e) { if (gridMain.SelectedIndices.Length < 1) { return; } Payment pay = Payments.GetPayment(PIn.Long(_tableTrans.Rows[gridMain.SelectedIndices[0]]["PaymentNum"].ToString())); if (pay == null) //The payment has been deleted { MsgBox.Show(this, "This payment no longer exists."); return; } Patient pat = Patients.GetPat(pay.PatNum); Family fam = Patients.GetFamily(pat.PatNum); FormPayment FormP = new FormPayment(pat, fam, pay, false); FormP.ShowDialog(); FillGrid(); }
private void menuItemOpenPayment_Click(object sender, EventArgs e) { RecurringCharge charge = gridMain.SelectedTag <RecurringCharge>(); if (charge == null || charge.PayNum == 0) { return; } Payment pay = Payments.GetPayment(charge.PayNum); if (pay == null) //The payment has been deleted { MsgBox.Show(this, "This payment no longer exists."); return; } Patient pat = Patients.GetPat(pay.PatNum); Family fam = Patients.GetFamily(pat.PatNum); FormPayment FormP = new FormPayment(pat, fam, pay, false); FormP.ShowDialog(); }