private void gridProviderAdjustments_CellDoubleClick(object sender, ODGridClickEventArgs e) { Hx835_ProvAdj provAdj = (Hx835_ProvAdj)gridProviderAdjustments.ListGridRows[e.Row].Tag; MsgBoxCopyPaste msgbox = new MsgBoxCopyPaste( provAdj.Npi + "\r\n" + provAdj.DateFiscalPeriod.ToShortDateString() + "\r\n" + provAdj.ReasonCode + " " + provAdj.ReasonCodeDescript + "\r\n" + provAdj.RefIdentification + "\r\n" + provAdj.AdjAmt.ToString("f2")); msgbox.Show(this); //This window is just used to display information. }
///<summary>Reads the X12 835 text in the MessageText variable and displays the information from Table 3 (Summary).</summary> private void FillProviderAdjustmentDetails() { if (_x835.ListProvAdjustments.Count == 0) { gridProviderAdjustments.Title = "Provider Adjustments (None Reported)"; } else { gridProviderAdjustments.Title = "Provider Adjustments"; } const int colWidthNPI = 88; const int colWidthFiscalPeriod = 80; const int colWidthReasonCode = 90; const int colWidthRefIdent = 80; const int colWidthAmount = 80; int colWidthVariable = gridProviderAdjustments.Width - colWidthNPI - colWidthFiscalPeriod - colWidthReasonCode - colWidthRefIdent - colWidthAmount; gridProviderAdjustments.BeginUpdate(); gridProviderAdjustments.ListGridColumns.Clear(); gridProviderAdjustments.ListGridColumns.Add(new GridColumn("NPI", colWidthNPI, HorizontalAlignment.Center)); gridProviderAdjustments.ListGridColumns.Add(new GridColumn("FiscalPeriod", colWidthFiscalPeriod, HorizontalAlignment.Center)); gridProviderAdjustments.ListGridColumns.Add(new GridColumn("Reason", colWidthVariable, HorizontalAlignment.Left)); gridProviderAdjustments.ListGridColumns.Add(new GridColumn("ReasonCode", colWidthReasonCode, HorizontalAlignment.Center)); gridProviderAdjustments.ListGridColumns.Add(new GridColumn("RefIdent", colWidthRefIdent, HorizontalAlignment.Center)); gridProviderAdjustments.ListGridColumns.Add(new GridColumn("AdjAmt", colWidthAmount, HorizontalAlignment.Right)); gridProviderAdjustments.EndUpdate(); gridProviderAdjustments.BeginUpdate(); gridProviderAdjustments.ListGridRows.Clear(); _provAdjAmtSum = 0; for (int i = 0; i < _x835.ListProvAdjustments.Count; i++) { Hx835_ProvAdj provAdj = _x835.ListProvAdjustments[i]; GridRow row = new GridRow(); row.Tag = provAdj; row.Cells.Add(new GridCell(provAdj.Npi)); //NPI row.Cells.Add(new GridCell(provAdj.DateFiscalPeriod.ToShortDateString())); //FiscalPeriod row.Cells.Add(new GridCell(provAdj.ReasonCodeDescript)); //Reason row.Cells.Add(new GridCell(provAdj.ReasonCode)); //ReasonCode row.Cells.Add(new GridCell(provAdj.RefIdentification)); //RefIdent row.Cells.Add(new GridCell(provAdj.AdjAmt.ToString("f2"))); //AdjAmt _provAdjAmtSum += provAdj.AdjAmt; gridProviderAdjustments.ListGridRows.Add(row); } gridProviderAdjustments.EndUpdate(); }