private void invoiceBtn_Click(object sender, EventArgs e) { var currentRow = (AnonWaitingRoom)waitingRoomGridView.GetFocusedRow(); if (currentRow != null) { var claimantChoose = new Accounting.Invoice.claimantSelectViewForm(currentRow.ID); claimantChoose.ShowDialog(); if (claimantChoose.DialogResult == DialogResult.OK) { var newConnection = new dbContextDataContext(); var currentPhysio = newConnection.tblPhysios.Where(physio => physio.PhysioID == currentRow.Physio).FirstOrDefault(); var newInvoice = new Accounting.Invoice.newInvoiceForm(claimantChoose.myClaimant, currentPhysio); newInvoice.ShowDialog(); } } else { MessageBox.Show("Please Select a Patient first!"); } }
private void AddClaimantBtnClick(object sender, EventArgs e) { var foo = new Accounting.Invoice.claimantSelectViewForm(); foo.ShowDialog(); if (foo.DialogResult == DialogResult.OK) { this._controller.EditCopyClaimantList.Add(foo.myClaimant); this.claimantListBox.DataSource = this._controller.EditCopyClaimantList; this.claimantListBox.DataSource = null; this.claimantListBox.DataSource = this._controller.EditCopyClaimantList; claimantListBox.Refresh(); } }