Exemplo n.º 1
0
        protected override void saveTaskState(FtdScheduleTask task)
        {
            //取得之前的資料
            var rowTask = NsDmHelper.WT_ScheduleTask
                          .wherepk(task.Db_PrimaryKey)
                          .queryFirst();

            rowTask.WTST_ExecuteBeginDate = task.ExecuteBeginDate.Value;
            rowTask.WTST_ExecuteEndDate   = task.ExecuteEndDate.Value;
            if (task.ServiceException == null)
            {
                rowTask.WTST_ExecuteException = string.Empty;
                rowTask.WTST_ExecuteState     = "A";

                EoUserEventHelper.logEvent("WT_ScheduleTaskExecuted", "", task.Db_PrimaryKey);
            }
            else
            {
                rowTask.WTST_ExecuteException = task.ServiceException.ToString();
                rowTask.WTST_ExecuteState     = "B";

                EoUserEventHelper.logEvent("WT_ScheduleTaskFailed", "", task.Db_PrimaryKey);
            }

            rowTask.ns_update();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 登入指定帳號,並移轉至指定網址(如有指定)
        /// </summary>
        public virtual void login(string userId, string defaultUrl)
        {
            //結束Session
            HttpContext.Current.Session.Abandon();

            //票証設定
            FormsAuthentication.SetAuthCookie(userId, false);

            //登入事件
            EoUserEventHelper.logEvent(AppUserEventName.EO_UserLogin, userId, "AppWeb");

            //重導至目的頁
            //if (defaultUrl.isNullOrEmpty())
            //{
            //    defaultUrl = FormsAuthentication.DefaultUrl;
            //}
            //HttpContext.Current.Response.Redirect(defaultUrl, false);
        }