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