コード例 #1
0
        /// <summary>
        /// 初始化视图状态
        /// </summary>
        private void InitViewState()
        {
            int year = DateTime.Now.Year;
            Mod_Online_YearPlanEntity model = new Mod_Online_YearPlanBiz().GetYearPlanModel(year.ToString());

            if (model == null)
            {
                Response.Redirect("~/Webs/404.aspx");
            }
        }
コード例 #2
0
        /// <summary>
        /// 获取年度计划分数是否可以查询
        /// </summary>
        /// <returns></returns>
        public JsonResult GetNewYearPlanEnable()
        {
            bool flag = false;
            int  year = DateTime.Now.Year;
            Mod_Online_YearPlanEntity model = new Mod_Online_YearPlanBiz().GetYearPlanModel(year.ToString());

            if (model == null)
            {
                flag = false;
            }
            else
            {
                if (model.StateFlag >= YearPlanSearchEnable.Open.ToInt())
                {
                    flag = true;
                }
            }
            return(Json(flag));
        }
コード例 #3
0
        /// <summary>
        /// 初始化视图状态
        /// </summary>
        private void InitViewState()
        {
            Mod_Online_YearPlanBiz    planBiz = new Mod_Online_YearPlanBiz();
            Mod_Online_YearPlanEntity model   = planBiz.GetFirstYearPlanModel();

            if (model == null)
            {
                Response.Redirect("~/Webs/404.aspx");
            }
            else
            {
                PlanId = model.PlanId;
                YearId = model.YearId;
                if (model.StateFlag == 1)
                {
                    CurrentEnable = true;
                }
            }
        }