コード例 #1
0
ファイル: ilc.Master.cs プロジェクト: radtek/quartz-plus
 protected static IlcStatusData GetStatusData()
 {
     try
     {
         return(IlcWebDao.GetStatusData());
     }
     catch (Exception ex)
     {
         new ExceptionLogger().HandleException(ex);
         return(null);
     }
 }
コード例 #2
0
        /// <summary>
        /// returns initial QuickCheck button disabled status
        /// </summary>
        /// <returns>disabled or not</returns>
        public static string GetInitialQuickCheckStatus()
        {
            string status = StatusHandler.GetServiceStatus();

            if (status != ConstExpressions.SERVICE_STATUS_STARTED)
            {
                return("Disabled");
            }

            IlcStatusData data = IlcWebDao.GetStatusData();

            return(data.currServiceState == ConstExpressions.WORK_STATUS_IDLE ? "" : "Disabled");
        }
コード例 #3
0
ファイル: StatusHandler.cs プロジェクト: radtek/quartz-plus
        private static string GetServiceInfo()
        {
            IlcStatusData data = IlcWebDao.GetStatusData();

            string status = GetServiceStatus();

            if (status != ConstExpressions.SERVICE_STATUS_STARTED)
            {
                data.currServiceState = ConstExpressions.WORK_STATUS_IDLE;
            }

            return(string.Format("{0},{1},{2},{3}",
                                 status, data.lastCheckDate, data.currServiceState, DateTime.Now));
        }
コード例 #4
0
        private void GetIlcSettingsData()
        {
            IlcSettingsData data = IlcWebDao.GetIlcSettingsData();

            scheduleCron.Text             = data.scheduleCron;
            outgoingChanels.Text          = data.outgoingChannels;
            timeSpan.Text                 = data.timeSpan;
            commonEmail.Text              = data.commonRecipientEmailAddresses;
            timeBetweenVerifications.Text = data.timeSpanBetweenVerifications;
            maxAttempts.Text              = data.attemptsMaxNumber;
            fromEmail.Text                = data.emailFromAddress;
            summaryReportCron.Text        = data.summaryReportCron;
            summaryEmail.Text             = data.summaryRecipientEmail;
            jobMisfireThreshold.Text      = data.jobMisfireThreshold;
        }
コード例 #5
0
        private void MakeReport()
        {
            List <KeyValuePair <string, object> > queryParams = new List <KeyValuePair <string, object> >();

            AddParams(queryParams
                      , "IVR_SERVER_ID", server.SelectedValue
                      , "IVR_PROJECT.NAME", projectName.Text
                      , "TNUMBER", phoneNumber.Text
                      , "USERID", userId.Text
                      , "STATUS", status.SelectedValue
                      );

            IFormatProvider culture = new CultureInfo("en-US", true);

            IList <SummaryReportItem> reportData = IlcWebDao.GetSummaryReportData(
                DateTime.Parse(startDate.Text + " " + startTime.Text, culture, DateTimeStyles.AllowWhiteSpaces),
                DateTime.Parse(endDate.Text + " " + endTime.Text, culture, DateTimeStyles.AllowWhiteSpaces),
                queryParams);

            DataSet dst = new DataSet();

            dst.ReadXmlSchema(Server.MapPath("Report.xsd"));

            foreach (SummaryReportItem item in reportData)
            {
                int checkSuccess = item.checksCount - item.failedChecksCount;

                dst.Tables[0].Rows.Add(
                    item.projectName,
                    item.serverName,
                    item.phone,
                    string.IsNullOrEmpty(item.userId) ? "n/a" : item.userId,
                    item.checksCount,
                    checkSuccess,
                    item.failedChecksCount,
                    string.Format("{0:P1}", (float)checkSuccess / item.checksCount),
                    item.lastSuccessDate,
                    item.lastFailedDate
                    );
            }

            DataTable reportDataSource = dst.Tables[0];

            Session[ReportDataSourceSessionKey] = reportDataSource;

            CrystalReportSource1.ReportDocument.SetDataSource(reportDataSource);
            crystalReportViewer.DataBind();
        }
コード例 #6
0
        protected void SaveButton_Click(object sender, EventArgs e)
        {
            if (!IsValid)
            {
                return;
            }

            IlcSettingsData data = new IlcSettingsData();

            data.scheduleCron     = scheduleCron.Text;
            data.outgoingChannels = outgoingChanels.Text = outgoingChanels.Text.Trim();
            data.timeSpan         = timeSpan.Text = timeSpan.Text.Trim();
            data.commonRecipientEmailAddresses = commonEmail.Text = commonEmail.Text;
            data.timeSpanBetweenVerifications  = timeBetweenVerifications.Text = timeBetweenVerifications.Text.Trim();
            data.attemptsMaxNumber             = maxAttempts.Text = maxAttempts.Text.Trim();
            data.emailFromAddress      = fromEmail.Text;
            data.summaryReportCron     = summaryReportCron.Text = summaryReportCron.Text.Trim();
            data.summaryRecipientEmail = summaryEmail.Text;
            data.jobMisfireThreshold   = jobMisfireThreshold.Text = jobMisfireThreshold.Text.Trim();

            IlcWebDao.UpdateIlcSettings(data, User);
        }