Exemplo n.º 1
0
        protected void CreateGlobalHeaderRow(UReportPage page)
        {
            CRow r = (CRow)rowdef["GLB_HEADER_LEVEL0"];

            CRow   nr   = r.Clone();
            String info = String.Format("{0} ({1})", CUtil.DateTimeToDateStringTime(DateTime.Now), OnixWebServiceAPI.GetLastUserLogin());

            nr.FillColumnsText(info, "Page " + CurrentPage);
            ConstructUIRow(page, nr);

            AvailableSpace = AvailableSpace - nr.GetHeight();

            String rpid = rptparam.GetFieldValue("REPORT_ID");

            r = (CRow)rowdef["GLB_HEADER_LEVEL1"];
            r.FillColumnsText(reportObj.Optional);
            ConstructUIRow(page, r);

            AvailableSpace = AvailableSpace - r.GetHeight();

            String header = createReportParamHeader();

            if (!header.Equals(""))
            {
                CRow paramRow = (CRow)rowdef["GLB_HEADER_PARAM"];
                paramRow.FillColumnsText(header);
                ConstructUIRow(page, paramRow);

                AvailableSpace = AvailableSpace - paramRow.GetHeight();
            }
        }
Exemplo n.º 2
0
        private Boolean isPeriodOK(MPeriod p)
        {
            Hashtable days = new Hashtable();

            days[1] = DayOfWeek.Monday;
            days[2] = DayOfWeek.Tuesday;
            days[3] = DayOfWeek.Wednesday;
            days[4] = DayOfWeek.Thursday;
            days[5] = DayOfWeek.Friday;
            days[6] = DayOfWeek.Saturday;
            days[7] = DayOfWeek.Sunday;

            DayOfWeek d = (DayOfWeek)days[CUtil.StringToInt(p.DayOfWeek)];

            if (d != billDate.DayOfWeek)
            {
                return(false);
            }

            if (!p.IsEnabled)
            {
                return(false);
            }


            if (p.IsEnabled && (p.PeriodType == IntervalTypeEnum.DAY_ENTIRE))
            {
                //All day
                return(true);
            }

            String fromHHMM = String.Format("{0}:{1}", p.FromHour1, p.FromMinute1);
            String toHHMM   = String.Format("{0}:{1}", p.ToHour1, p.ToMinute1);
            String currTime = CUtil.DateTimeToDateStringTime(billTime).Substring(11, 5);

            if ((currTime.CompareTo(fromHHMM) >= 0) && (currTime.CompareTo(toHHMM) <= 0))
            {
                return(true);
            }

            return(false);
        }