Пример #1
0
 private void FormEtrans270Edit_Load(object sender, EventArgs e)
 {
     MessageText    = EtransMessageTexts.GetMessageText(EtransCur.EtransMessageTextNum);
     MessageTextAck = "";
     //textMessageText.Text=MessageText;
     textNote.Text = EtransCur.Note;
     EtransAck271  = Etranss.GetEtrans(EtransCur.AckEtransNum);
     x271          = null;
     if (EtransAck271 != null)
     {
         MessageTextAck = EtransMessageTexts.GetMessageText(EtransAck271.EtransMessageTextNum);              //.Replace("~","~\r\n");
         if (EtransAck271.Etype == EtransType.BenefitResponse271)
         {
             x271 = new X271(MessageTextAck);
         }
     }
     listDTP = new List <DTP271>();
     if (x271 != null)
     {
         listDTP = x271.GetListDtpSubscriber();
     }
     FillGridDates();
     CreateListOfBenefits();
     FillGrid();
     FillGridBen();
     if (IsInitialResponse)
     {
         SelectForImport();
     }
 }
Пример #2
0
 private void butPrint_Click(object sender, EventArgs e)
 {
     pd2            = new PrintDocument();
     pd2.PrintPage += new PrintPageEventHandler(this.pd2_PrintPage);
     pd2.DefaultPageSettings.Margins = new Margins(75, 75, 50, 100);
     if (pd2.DefaultPageSettings.PrintableArea.Height == 0)
     {
         pd2.DefaultPageSettings.PaperSize = new PaperSize("default", 850, 1100);
     }
     linesPrinted = 0;
     try {
                         #if DEBUG
         FormRpPrintPreview pView = new FormRpPrintPreview();
         pView.printPreviewControl2.Document = pd2;
         pView.ShowDialog();
                         #else
         if (PrinterL.SetPrinter(pd2, PrintSituation.Default, EtransCur.PatNum, "Etrans message text from " + EtransCur.DateTimeTrans.ToShortDateString() + " printed"))
         {
             pd2.Print();
         }
                         #endif
     }
     catch {
         MessageBox.Show(Lan.g(this, "Printer not available"));
     }
     EtransCur.Note = Lan.g(this, "Printed") + textNote.Text;
     Etranss.Update(EtransCur);
     DialogResult = DialogResult.OK;
 }
Пример #3
0
        private void FillGrid()
        {
            list = Etranss.GetList270ForPlan(PlanNum, SubNum);
            List <long> listPatNums = list.Select(x => x.PatNum).ToList();

            listPatNums.Add(_subPatNum);
            _listPatients = Patients.GetMultPats(listPatNums);          //Can contain 0.
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g(this, "Date"), 100);

            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Patient"), 100);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Response"), 100);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < list.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(list[i].DateTimeTrans.ToShortDateString());
                //All old 270s do not have a patNum set, so they were subscriber request.
                string patName = Patients.GetOnePat(_listPatients, (list[i].PatNum == 0?_subPatNum:list[i].PatNum)).GetNameLFnoPref();
                row.Cells.Add(patName);
                row.Cells.Add(list[i].Note);
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
Пример #4
0
        private void gridMain_DoubleClick(object sender, EventArgs e)
        {
            int index = gridMain.GetSelectedIndex();

            if (index == -1)           //Clicked in empty space.
            {
                return;
            }
            //Mimics FormClaimsSend.gridHistory_CellDoubleClick(...)
            Cursor = Cursors.WaitCursor;
            Etrans et = (Etrans)gridMain.ListGridRows[index].Tag;

            //Sadly this is needed due to FormEtrans835Edit calling Etranss.Update .
            //See Etranss.RefreshHistory(...), this query does not select all etrans columns.
            //Mimics FormClaimsSend.gridHistory_CellDoubleClick(...)
            et = Etranss.GetEtrans(et.EtransNum);
            if (et == null)
            {
                Cursor = Cursors.Default;
                MsgBox.Show(this, "ERA could not be found, it was most likely deleted.");
                RefreshAndFillGrid();
                return;
            }
            EtransL.ViewFormForEra(et, this);
            Cursor = Cursors.Default;
        }
Пример #5
0
        //private void butDelete_Click(object sender,EventArgs e) {
        //if(!MsgBox.Show(this,true,"Permanently delete the data for this transaction?  This does not alter actual claims.")){
        //	return;
        //}
        //Etranss.Delete(
        //}

        private void butOK_Click(object sender, System.EventArgs e)
        {
            //EtransCur.AckCode=textAckCode.Text;
            EtransCur.Note = textNote.Text;
            Etranss.Update(EtransCur);
            DialogResult = DialogResult.OK;
        }
Пример #6
0
        private void butOK_Click(object sender, EventArgs e)
        {
            EtransCur.Note = textNote.Text;
            bool isReceived = true;

            for (int i = 0; i < gridClaimDetails.ListGridRows.Count; i++)
            {
                if (gridClaimDetails.ListGridRows[i].Cells[0].Text == "")
                {
                    isReceived = false;
                    break;
                }
            }
            if (isReceived)
            {
                EtransCur.AckCode = "Recd";
            }
            else
            {
                EtransCur.AckCode = "";
            }
            Etranss.Update(EtransCur);
            DialogResult = DialogResult.OK;
            Close();
        }
Пример #7
0
        private void FormEtrans270Edit_Load(object sender, EventArgs e)
        {
            MessageText    = EtransMessageTexts.GetMessageText(EtransCur.EtransMessageTextNum);
            MessageTextAck = "";
            //textMessageText.Text=MessageText;
            textNote.Text = EtransCur.Note;
            EtransAck271  = Etranss.GetEtrans(EtransCur.AckEtransNum);
            x271          = null;
            if (EtransAck271 != null)
            {
                MessageTextAck = EtransMessageTexts.GetMessageText(EtransAck271.EtransMessageTextNum);              //.Replace("~","~\r\n");
                if (EtransAck271.Etype == EtransType.BenefitResponse271)
                {
                    x271 = new X271(MessageTextAck);
                }
            }
            listDTP = new List <DTP271>();
            if (x271 != null)
            {
                listDTP = x271.GetListDtpSubscriber();
            }
            radioBenefitSendsPat.Checked = (!_isConinsuranceInverted);
            radioBenefitSendsIns.Checked = (_isConinsuranceInverted);
            FillGridDates();
            CreateListOfBenefits();
            FillGrid();
            FillGridBen();
            if (IsInitialResponse)
            {
                SelectForImport();
            }
            long patNum = (EtransCur.PatNum == 0?_subPatNum:EtransCur.PatNum);        //Older 270/217s were always for the subscriber and have etrans.PatNum of 0.

            this.Text += ": " + Patients.GetNameLF(patNum);
        }
Пример #8
0
        ///<summary>Takes any files found in the reports folder for the clearinghouse, and imports them into the database.  Deletes the original files.  No longer any such thing as archive.</summary>
        private void ImportReportFiles()
        {
            if (!Directory.Exists(Clearinghouses.Listt[comboClearhouse.SelectedIndex].ResponsePath))
            {
                //MsgBox.Show(this,"Clearinghouse does not have a valid Report Path set.");
                return;
            }
            if (Clearinghouses.Listt[comboClearhouse.SelectedIndex].CommBridge == EclaimsCommBridge.CDAnet)
            {
                //the report path is shared with many other important files.  Do not process anything.  Comm is synchronous only.
                return;
            }
            string[] files      = Directory.GetFiles(Clearinghouses.Listt[comboClearhouse.SelectedIndex].ResponsePath);
            string   archiveDir = ODFileUtils.CombinePaths(Clearinghouses.Listt[comboClearhouse.SelectedIndex].ResponsePath, "Archive");

            if (!Directory.Exists(archiveDir))
            {
                Directory.CreateDirectory(archiveDir);
            }
            for (int i = 0; i < files.Length; i++)
            {
                Etranss.ProcessIncomingReport(
                    File.GetCreationTime(files[i]),
                    Clearinghouses.Listt[comboClearhouse.SelectedIndex].ClearinghouseNum,
                    File.ReadAllText(files[i]));
                try{
                    File.Copy(files[i], ODFileUtils.CombinePaths(archiveDir, Path.GetFileName(files[i])));
                }
                catch {}
                File.Delete(files[i]);
            }
        }
Пример #9
0
 private void PrintItem_Click()
 {
     //not currently accessible
     if (gridHistory.Rows.Count == 0)
     {
         MsgBox.Show(this, "There are no items to print.");
         return;
     }
     if (gridHistory.SelectedIndices.Length == 0)
     {
                         #if DEBUG
         gridHistory.SetSelected(0, true);               //saves you a click when testing
                         #else
         MsgBox.Show(this, "Please select at least one item first.");
         return;
                         #endif
     }
     //does not yet handle multiple selections
     Etrans etrans = Etranss.GetEtrans(PIn.PInt(tableHistory.Rows[gridHistory.SelectedIndices[0]]["EtransNum"].ToString()));
     //blah blah blah
     bool         assigned = false;                              //TODO: set to true in the case of assigned claims, whatever that means.
     FormCCDPrint FormP    = new FormCCDPrint(etrans, assigned); //Print the form.
     FormP.Print();
     //MessageBox.Show(etrans.MessageText);
 }
Пример #10
0
        private void ShowRawMessage_Clicked(object sender, System.EventArgs e)
        {
            //accessed by right clicking on history
            if (gridHistory.SelectedIndices.Length != 1)
            {
                MsgBox.Show(this, "Please select exactly one item first.");
                return;
            }
            Etrans          et     = Etranss.GetEtrans(PIn.PInt(tableHistory.Rows[gridHistory.SelectedIndices[0]]["EtransNum"].ToString()));
            MsgBoxCopyPaste msgbox = new MsgBoxCopyPaste(et.MessageText);

            msgbox.ShowDialog();
        }
Пример #11
0
        /*
         * private void butShowResponseDeciph_Click(object sender,EventArgs e) {
         *      if(!X12object.IsX12(MessageTextAck)) {
         *              MessageBox.Show("Only works with 997's");
         *              return;
         *      }
         *      X12object x12obj=new X12object(MessageTextAck);
         *      if(!x12obj.Is997()) {
         *              MessageBox.Show("Only works with 997's");
         *              return;
         *      }
         *      X997 x997=new X997(MessageTextAck);
         *      string display=x997.GetHumanReadable();
         *      MsgBoxCopyPaste msgbox=new MsgBoxCopyPaste(display);
         *      msgbox.ShowDialog();
         * }*/

        private void butDelete_Click(object sender, EventArgs e)
        {
            //This button is not visible if IsNew
            if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete entire request and response?"))
            {
                return;
            }
            if (EtransAck271 != null)
            {
                EtransMessageTexts.Delete(EtransAck271.EtransMessageTextNum);
                Etranss.Delete(EtransAck271.EtransNum);
            }
            EtransMessageTexts.Delete(EtransCur.EtransMessageTextNum);
            Etranss.Delete(EtransCur.EtransNum);
            DialogResult = DialogResult.OK;
        }
Пример #12
0
 private void FormEtransEdit_Load(object sender, EventArgs e)
 {
     MessageText            = EtransMessageTexts.GetMessageText(EtransCur.EtransMessageTextNum);
     textMessageText.Text   = MessageText;
     textDateTimeTrans.Text = EtransCur.DateTimeTrans.ToString();
     textClaimNum.Text      = EtransCur.ClaimNum.ToString();
     textBatchNumber.Text   = EtransCur.BatchNumber.ToString();
     textTransSetNum.Text   = EtransCur.TransSetNum.ToString();
     textAckCode.Text       = EtransCur.AckCode;
     textNote.Text          = EtransCur.Note;
     if (EtransCur.Etype == EtransType.ClaimSent)
     {
         if (X12object.IsX12(MessageText))
         {
             X12object x12obj = new X12object(MessageText);
             if (x12obj.IsFormat4010())
             {
                 X837_4010 x837 = new X837_4010(MessageText);
                 checkAttachments.Checked = x837.AttachmentsWereSent(EtransCur.ClaimNum);                      //This function does not currently work, so the corresponding checkbox is hidden on the form as well.
             }
             else if (x12obj.IsFormat5010())
             {
                 X837_5010 x837 = new X837_5010(MessageText);
                 checkAttachments.Checked = x837.AttachmentsWereSent(EtransCur.ClaimNum);                      //This function does not currently work, so the corresponding checkbox is hidden on the form as well.
             }
         }
     }
     if (EtransCur.AckEtransNum > 0)
     {
         AckCur = Etranss.GetEtrans(EtransCur.AckEtransNum);
         if (AckCur != null)
         {
             textAckMessage.Text  = EtransMessageTexts.GetMessageText(AckCur.EtransMessageTextNum);
             textAckDateTime.Text = AckCur.DateTimeTrans.ToString();
             textAckNote.Text     = AckCur.Note;
         }
     }
     else
     {
         AckCur           = null;
         groupAck.Visible = false;
     }
     if (!CultureInfo.CurrentCulture.Name.EndsWith("CA"))             //Not Canadian.
     {
         butPrintAck.Visible = false;
     }
 }
Пример #13
0
        private void butPrint_Click(object sender, EventArgs e)
        {
            linesPrinted = 0;
            bool isPrinted = PrinterL.TryPrintOrDebugRpPreview(pd2_PrintPage,
                                                               Lan.g(this, "Etrans message text from") + " " + EtransCur.DateTimeTrans.ToShortDateString() + " " + Lan.g(this, "printed"),
                                                               auditPatNum: EtransCur.PatNum,
                                                               margins: new Margins(75, 75, 50, 100)
                                                               );

            if (!isPrinted)
            {
                return;
            }
            EtransCur.Note = Lan.g(this, "Printed") + textNote.Text;
            Etranss.Update(EtransCur);
            DialogResult = DialogResult.OK;
        }
Пример #14
0
        private void FormEtrans270Edit_Load(object sender, EventArgs e)
        {
            MessageText    = EtransMessageTexts.GetMessageText(EtransCur.EtransMessageTextNum);
            MessageTextAck = "";
            //textMessageText.Text=MessageText;
            textNote.Text = EtransCur.Note;
            EtransAck271  = Etranss.GetEtrans(EtransCur.AckEtransNum);
            x271          = null;
            if (EtransAck271 != null)
            {
                MessageTextAck = EtransMessageTexts.GetMessageText(EtransAck271.EtransMessageTextNum);              //.Replace("~","~\r\n");
                if (EtransAck271.Etype == EtransType.BenefitResponse271)
                {
                    x271 = new X271(MessageTextAck);
                }
            }
            listDTP = new List <DTP271>();
            if (x271 != null)
            {
                listDTP = x271.GetListDtpSubscriber();
                textResponseGroupNum.Text = x271.GetGroupNum();
            }
            if (textCurrentGroupNum.Text != textResponseGroupNum.Text)
            {
                errorProviderGroupNum.SetError(textCurrentGroupNum, Lan.g(this, "Mismatched group number."));
            }
            radioBenefitSendsPat.Checked = (!_isConinsuranceInverted);
            radioBenefitSendsIns.Checked = (_isConinsuranceInverted);
            FillGridDates();
            CreateListOfBenefits();
            FillGrid();
            FillGridBen();
            if (IsInitialResponse)
            {
                SelectForImport();
            }
            long patNum = (EtransCur.PatNum == 0?_subPatNum:EtransCur.PatNum);        //Older 270/217s were always for the subscriber and have etrans.PatNum of 0.

            this.Text += ": " + Patients.GetNameLF(patNum);
            if (Clearinghouses.GetFirstOrDefault(x => x.ClearinghouseNum == EtransCur.ClearingHouseNum)?.CommBridge == EclaimsCommBridge.EDS &&
                EtransAck271 != null && EtransAck271.AckEtransNum != 0)
            {
                _htmlResponse    = EtransMessageTexts.GetMessageText(Etranss.GetEtrans(EtransAck271.AckEtransNum).EtransMessageTextNum);
                butPrint.Visible = true;
            }
        }
Пример #15
0
        private void Undo_Click()
        {
            if (gridHistory.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "Please select at least one item first.");
                return;
            }
            if (gridHistory.SelectedIndices.Length > 1)          //if there are multiple items selected.
            //then they must all be Claim_Ren, ClaimSent, or ClaimPrinted
            {
                EtransType etype;
                for (int i = 0; i < gridHistory.SelectedIndices.Length; i++)
                {
                    etype = (EtransType)PIn.PInt(tableHistory.Rows[gridHistory.SelectedIndices[i]]["Etype"].ToString());
                    if (etype != EtransType.Claim_Ren && etype != EtransType.ClaimSent && etype != EtransType.ClaimPrinted)
                    {
                        MsgBox.Show(this, "That type of transaction cannot be undone as a group.  Please undo one at a time.");
                        return;
                    }
                }
            }
            //loop through each selected item, and see if they are allowed to be "undone".
            //at this point,
            for (int i = 0; i < gridHistory.SelectedIndices.Length; i++)
            {
                if ((EtransType)PIn.PInt(tableHistory.Rows[gridHistory.SelectedIndices[i]]["Etype"].ToString()) == EtransType.Claim_CA)
                {
                    //if a
                }
                //else if(){

                //}
            }
            if (!MsgBox.Show(this, true, "Remove the selected claims from the history list, and change the claim status from 'Sent' back to 'Waiting to Send'?"))
            {
                return;
            }
            for (int i = 0; i < gridHistory.SelectedIndices.Length; i++)
            {
                Etranss.Undo(PIn.PInt(tableHistory.Rows[gridHistory.SelectedIndices[i]]["EtransNum"].ToString()));
            }
            FillGrid();
            FillHistory();
        }
Пример #16
0
        private void gridMain_DoubleClick(object sender, EventArgs e)
        {
            int index = gridMain.GetSelectedIndex();

            if (index == -1)           //Clicked in empty space.
            {
                return;
            }
            //Mimics FormClaimsSend.gridHistory_CellDoubleClick(...)
            Cursor = Cursors.WaitCursor;
            Etrans et = (Etrans)gridMain.Rows[index].Tag;

            //Sadly this is needed due to FormEtrans835Edit calling Etranss.Update .
            //See Etranss.RefreshHistory(...), this query does not select all etrans columns.
            //Mimics FormClaimsSend.gridHistory_CellDoubleClick(...)
            et = Etranss.GetEtrans(et.EtransNum);
            FormEtrans835Edit.ShowEra(et);
            Cursor = Cursors.Default;
        }
Пример #17
0
        private void OnPrint_Click()
        {
            FormClaimPrint FormCP = new FormClaimPrint();

            if (gridMain.SelectedIndices.Length == 0)
            {
                for (int i = 0; i < listQueue.Length; i++)
                {
                    if ((listQueue[i].ClaimStatus == "W" || listQueue[i].ClaimStatus == "P") &&
                        listQueue[i].NoSendElect)
                    {
                        gridMain.SetSelected(i, true);
                    }
                }
                if (MessageBox.Show(Lan.g(this, "No items were selected.  Print all selected paper claims?"), ""
                                    , MessageBoxButtons.OKCancel) != DialogResult.OK)
                {
                    return;
                }
            }
            PrintDocument pd = new PrintDocument();

            if (!Printers.SetPrinter(pd, PrintSituation.Claim))
            {
                return;
            }
            for (int i = 0; i < gridMain.SelectedIndices.Length; i++)
            {
                FormCP.ThisPatNum   = listQueue[gridMain.SelectedIndices[i]].PatNum;
                FormCP.ThisClaimNum = listQueue[gridMain.SelectedIndices[i]].ClaimNum;
                if (!FormCP.PrintImmediate(pd.PrinterSettings.PrinterName, 1))
                {
                    return;
                }
                Etranss.SetClaimSentOrPrinted(listQueue[gridMain.SelectedIndices[i]].ClaimNum,
                                              listQueue[gridMain.SelectedIndices[i]].PatNum, 0, EtransType.ClaimPrinted);
            }
            FillGrid();
            FillHistory();
        }
Пример #18
0
 private void FormEtransEdit_Load(object sender, EventArgs e)
 {
     MessageText            = EtransMessageTexts.GetMessageText(EtransCur.EtransMessageTextNum);
     textMessageText.Text   = MessageText;
     textDateTimeTrans.Text = EtransCur.DateTimeTrans.ToString();
     textClaimNum.Text      = EtransCur.ClaimNum.ToString();
     textBatchNumber.Text   = EtransCur.BatchNumber.ToString();
     textTransSetNum.Text   = EtransCur.TransSetNum.ToString();
     textAckCode.Text       = EtransCur.AckCode;
     textNote.Text          = EtransCur.Note;
     if (EtransCur.Etype == EtransType.ClaimSent)
     {
         if (X12object.IsX12(MessageText))
         {
             //TODO: we need to do something different here for 5010s.
             X837_4010 x837 = new X837_4010(MessageText);
             checkAttachments.Checked = x837.AttachmentsWereSent(EtransCur.ClaimNum);
         }
     }
     if (EtransCur.AckEtransNum > 0)
     {
         AckCur = Etranss.GetEtrans(EtransCur.AckEtransNum);
         if (AckCur != null)
         {
             textAckMessage.Text  = EtransMessageTexts.GetMessageText(AckCur.EtransMessageTextNum);
             textAckDateTime.Text = AckCur.DateTimeTrans.ToString();
         }
         groupAck.Text = Lan.g(this, "Acknowledgement");
     }
     else
     {
         AckCur           = null;
         groupAck.Visible = false;
     }
     if (!CultureInfo.CurrentCulture.Name.EndsWith("CA"))             //Not Canadian.
     {
         butPrintAck.Visible = false;
     }
 }
Пример #19
0
 ///<summary>Called when we want to refresh form list and data. Also calls FillGrid().
 ///Set hasFilters to true when we want to refresh and apply current filters.</summary>
 private void RefreshAndFillGrid()
 {
     _listAllEtrans = new List <Etrans>();
     if (ValidateFields())
     {
         DataTable table = Etranss.RefreshHistory(_reportDateFrom, _reportDateTo, new List <EtransType>()
         {
             EtransType.ERA_835
         });
         foreach (DataRow row in table.Rows)
         {
             Etrans etrans = new Etrans();
             etrans.EtransNum            = PIn.Long(row["EtransNum"].ToString());
             etrans.ClaimNum             = PIn.Long(row["ClaimNum"].ToString());
             etrans.Note                 = row["Note"].ToString();
             etrans.EtransMessageTextNum = PIn.Long(row["EtransMessageTextNum"].ToString());
             etrans.TranSetId835         = row["TranSetId835"].ToString();
             etrans.UserNum              = Security.CurUser.UserNum;
             etrans.DateTimeTrans        = PIn.DateT(row["dateTimeTrans"].ToString());
             _listAllEtrans.Add(etrans);
         }
     }
     FilterAndFillGrid(true);
 }
Пример #20
0
        private void FillGrid()
        {
            list = Etranss.GetList270ForPlan(PlanNum);
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g(this, "Date"), 100);

            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Response"), 100);
            gridMain.Columns.Add(col);

            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < list.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(list[i].DateTimeTrans.ToShortDateString());
                row.Cells.Add(list[i].Note);

                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }
Пример #21
0
        private void FillHistory()
        {
            if (textDateFrom.errorProvider1.GetError(textDateFrom) != "" ||
                textDateTo.errorProvider1.GetError(textDateTo) != ""
                )
            {
                return;
            }
            DateTime dateFrom = PIn.PDate(textDateFrom.Text);
            DateTime dateTo;

            if (textDateTo.Text == "")
            {
                dateTo = DateTime.MaxValue;
            }
            else
            {
                dateTo = PIn.PDate(textDateTo.Text);
            }
            tableHistory = Etranss.RefreshHistory(dateFrom, dateTo);
            //listQueue=Claims.GetQueueList();
            gridHistory.BeginUpdate();
            gridHistory.Columns.Clear();
            ODGridColumn col;

            col = new ODGridColumn(Lan.g("TableClaimHistory", "Patient Name"), 130);
            gridHistory.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableClaimHistory", "Carrier Name"), 170);
            gridHistory.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableClaimHistory", "Clearinghouse"), 120);
            gridHistory.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableClaimHistory", "Date"), 130);
            gridHistory.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableClaimHistory", "Type"), 100);
            gridHistory.Columns.Add(col);
            if (CultureInfo.CurrentCulture.Name.Substring(3) == "CA")          //en-CA or fr-CA
            {
                col = new ODGridColumn(Lan.g("TableClaimHistory", "Office#"), 100);
                gridHistory.Columns.Add(col);
                col = new ODGridColumn(Lan.g("TableClaimHistory", "CarrierCount"), 100);
                gridHistory.Columns.Add(col);
            }
            else
            {
                col = new ODGridColumn("", 100);             //spacer
                gridHistory.Columns.Add(col);
            }
            gridHistory.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < tableHistory.Rows.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(tableHistory.Rows[i]["patName"].ToString());
                row.Cells.Add(tableHistory.Rows[i]["CarrierName"].ToString());
                row.Cells.Add(tableHistory.Rows[i]["Clearinghouse"].ToString());
                row.Cells.Add(tableHistory.Rows[i]["dateTimeTrans"].ToString());
                //((DateTime)tableHistory.Rows[i]["DateTimeTrans"]).ToShortDateString());
                //still need to trim the _CA
                row.Cells.Add(tableHistory.Rows[i]["etype"].ToString());
                if (CultureInfo.CurrentCulture.Name.Substring(3) == "CA")
                {
                    row.Cells.Add(tableHistory.Rows[i]["OfficeSequenceNumber"].ToString());
                    row.Cells.Add(tableHistory.Rows[i]["CarrierTransCounter"].ToString());
                }
                else
                {
                    row.Cells.Add("");
                }
                gridHistory.Rows.Add(row);
            }
            gridHistory.EndUpdate();
        }
Пример #22
0
 private void butOK_Click(object sender, EventArgs e)
 {
     EtransCur.Note = textNote.Text;
     Etranss.Update(EtransCur);
     DialogResult = DialogResult.OK;
 }