Exemplo n.º 1
0
        public override StringBuilder Display(ref DAL.StatusReportDataTable aListing)
        {
            string appName = "";

            foreach (DAL.StatusReportRow row in aListing.Rows)
            {
                if (appName != row.Name)
                {
                    theReport.AppendFormat("\n{0}{1}: {2}"
                                           , (appName.Length == 0 ? "" : "\n")
                                           , row.Name
                                           , row.URL);
                    appName = row.Name;
                }

                theReport.AppendFormat("\n* {0:yyyy-MM-dd} {1} {2}: {3}"
                                       , row.TS
                                       , row.CUID
                                       , row.Cat.ToUpper()
                                       , row.Descr
                                       );
            }
            if (aListing.Rows.Count == 0)
            {
                theReport.Append("No status found.");
            }
            return(theReport);
        }
Exemplo n.º 2
0
        public StringBuilder GetListing()
        {
            int?   ec  = 0;
            string err = "";
            int?   ov  = 0;

            DAL.StatusReportDataTable listing = null;
            string descr = "%" + Description + "%";

            if (DateString.Length > 0 && Date == DateTime.MinValue)
            {
                ThrowError("Invalid date provided: {0}", DateString);
            }
            else if (Date == DateTime.MinValue)
            {
                DateTime.TryParse("1901-01-01", out theDate);
            }
            try
            {
                DALTableAdapters.StatusReportTableAdapter db = new wid.DALTableAdapters.StatusReportTableAdapter();
                listing = db.GetData(ref ec, ref err, ref ov, ReportUser
                                     , true
                                     , CUID
                                     , ApplicationName
                                     , ProjectName
                                     , Category
                                     , descr
                                     , Date);
            }
            catch (Exception ex)
            {
                ec  = -1;
                err = ex.Message;
                ov  = 0;
            }

            if (ec != 0)
            {
                ThrowError(err);
            }

            if (theFormats.ContainsKey(ReportStyle) == false)
            {
                ReportStyle = "flat";
            }

            StringBuilder report = theFormats[ReportStyle].Display(ref listing);

            if (NotifyList.Length > 0)
            {
                SendReport(report);
            }

            return(report);
        }
Exemplo n.º 3
0
 public override StringBuilder Display(ref DAL.StatusReportDataTable aListing)
 {
     foreach (DAL.StatusReportRow row in aListing.Rows)
     {
         theReport.AppendFormat("\n {0,5}) {1:yyyy-MM-dd hh:mm tt} / {2} / {3}: {4}"
                                , row.ReportID
                                , row.TS
                                , row.Name
                                , row.Cat
                                , row.Descr
                                );
     }
     return(theReport);
 }
Exemplo n.º 4
0
 public virtual StringBuilder Display(ref DAL.StatusReportDataTable aListing)
 {
     return(theReport);
 }