public List <ReportListItem> GetActivityList(string tableName) { List <ReportListItem> reportList = new List <ReportListItem>(); try { command.CommandText = "SELECT * FROM " + tableName + " where sync_status=0"; command.CommandType = CommandType.Text; connection.Open(); OleDbDataReader reader = command.ExecuteReader(); while (reader.Read()) { ReportListItem report = new ReportListItem(); report.Aid = Convert.ToInt32(reader["ID"].ToString()); report.LocalTimeStamp = reader.GetDateTime(11); report.Title = reader["region"].ToString() + ", " + reader["zone"].ToString() + ", " + reader["woreda"].ToString(); report.TableName = tableName; reportList.Add(report); } return(reportList); } catch (Exception) { throw; } finally { if (connection != null) { connection.Close(); } } }
public void AddReportListItem(ReportListItem item) { if (item != null) { _reportListItems.Add(item); } }
public CommonReportListItem(EntityRef procedureRef, EntityRef reportRef, ReportListItem firstItem) { _procedureRef = procedureRef; _reportRef = reportRef; _reportListItems = new List <ReportListItem>(); _reportListItems.Add(firstItem); }
public ReportListItem CreateReportListItem(Report report, Procedure rp, IPersistenceContext context) { var data = new ReportListItem(); UpdateListItem(data, rp.Order, context); UpdateListItem(data, rp.Order.Visit, context); UpdateListItem(data, rp, context); UpdateListItem(data, report, context); return(data); }
private static void UpdateListItem(ReportListItem data, Report report, IPersistenceContext context) { data.ReportRef = report.GetRef(); data.ReportStatus = EnumUtils.GetEnumValueInfo(report.Status, context); }