protected void btnGeneReportl_Click(object sender, DirectEventArgs e)
        {
            try
            {
                Server.ScriptTimeout = 300;
                try
                {
                    //SPDayReportWrapper.ArchivesData(this.Server.MapPath("~/DayReport/"), );

                    SPDayReportWrapper.ReGenerateDayReport(Convert.ToDateTime(this.dfStart.Value), Convert.ToDateTime(this.dfEnd.Value));

                    ResourceManager.AjaxSuccess = true;
                }
                catch (Exception ex)
                {
                    ResourceManager.AjaxSuccess      = false;
                    ResourceManager.AjaxErrorMessage = "错误信息:" + ex.Message;
                }
                ResourceManager.AjaxSuccess = true;
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "Error Message:" + ex.Message;
                return;
            }
        }
Esempio n. 2
0
        protected override void ExecuteInternal(JobExecutionContext context)
        {
            logger.Info("日报表任务开始。。。");

            try
            {
                SPDayReportWrapper.ReGenerateDayReport(DateTime.Now.AddDays(-1));

                logger.Info("日报表任务成功。。。");
            }
            catch (Exception ex)
            {
                logger.Error("日报表任务失败:" + ex.Message);
            }
        }
        private bool ReGenerateDayReport()
        {
            try
            {
                SPDayReportWrapper.ReGenerateDayReport(DateTime.Now.AddDays(-1));

                logger.Info("日报表任务成功。。。");

                return(true);
            }
            catch (Exception ex)
            {
                logger.Error("日报表任务失败:" + ex.Message);

                return(false);
            }
        }
        protected void StartLongAction(object sender, AjaxEventArgs e)
        {
            Server.ScriptTimeout = 300;
            try
            {
                //SPDayReportWrapper.ArchivesData(this.Server.MapPath("~/DayReport/"), );

                SPDayReportWrapper.ReGenerateDayReport(Convert.ToDateTime(this.dfStart.Value), Convert.ToDateTime(this.dfEnd.Value));

                Coolite.Ext.Web.ScriptManager.AjaxSuccess = true;
            }
            catch (Exception ex)
            {
                Coolite.Ext.Web.ScriptManager.AjaxSuccess      = false;
                Coolite.Ext.Web.ScriptManager.AjaxErrorMessage = "错误信息:" + ex.Message;
            }
        }
Esempio n. 5
0
 public void ReGenerateDayReportByDateRange(DateTime startDate, DateTime endDate)
 {
     SPDayReportWrapper.ReGenerateDayReport(startDate.Date, endDate.Date);
 }
Esempio n. 6
0
 public void ReGenerateDayReportByDate(DateTime reportDate)
 {
     SPDayReportWrapper.ReGenerateDayReport(reportDate.Date);
 }