예제 #1
0
        public ActionResult Index()
        {
            //获取配置信息
            DataTable GlobalSetDT   = GetSiteSetCfg.GetSiteGlobalSet(CurAuthor.JournalID.ToString());
            DataTable PersonalSetDT = GetSiteSetCfg.GetSitePersonalSet(CurAuthor.JournalID.ToString(), CurAuthor.AuthorID.ToString());
            //获取基本信息
            SiteConfigQuery query = new SiteConfigQuery();

            query.JournalID = CurAuthor.JournalID;
            ISiteConfigFacadeService service = ServiceContainer.Instance.Container.Resolve <ISiteConfigFacadeService>();
            SiteConfigEntity         model   = service.GetSiteConfigModel(query);

            if (model == null)
            {
                model = new SiteConfigEntity();
            }
            ViewBag.AuthorID                     = CurAuthor.AuthorID;
            ViewBag.IsShowPwdInput               = CurAuthor.LoginName == GlobalSetDT.Rows[0]["SysSuperAdmin"].ToString() ? 1 : 0;//是否显示password类型的输入框中的内容
            ViewBag.IsEnableRegActivate          = GlobalSetDT.Rows[0]["IsEnableRegActivate"].ToString();
            ViewBag.IsHideEditorInfoForAuthor    = GlobalSetDT.Rows[0]["IsHideEditorInfoForAuthor"].ToString();
            ViewBag.IsHideEditorInfoForExpert    = GlobalSetDT.Rows[0]["IsHideEditorInfoForExpert"].ToString();
            ViewBag.ShowNameForHide              = GlobalSetDT.Rows[0]["ShowNameForHide"].ToString();
            ViewBag.IsStopNotLoginDownPDF        = GlobalSetDT.Rows[0]["IsStopNotLoginDownPDF"].ToString();
            ViewBag.ShowMoreFlowInfoForAuthor    = GlobalSetDT.Rows[0]["ShowMoreFlowInfoForAuthor"].ToString();
            ViewBag.ShowHistoryFlowInfoForExpert = GlobalSetDT.Rows[0]["ShowHistoryFlowInfoForExpert"].ToString();
            ViewBag.isAutoHandle                 = GlobalSetDT.Rows[0]["isAutoHandle"].ToString();
            ViewBag.isStatByGroup                = GlobalSetDT.Rows[0]["isStatByGroup"].ToString();

            ViewBag.Personal_Order        = PersonalSetDT.Rows[0]["Personal_Order"].ToString();
            ViewBag.Personal_OnlyMySearch = PersonalSetDT.Rows[0]["Personal_OnlyMySearch"].ToString();

            return(View(model));
        }
예제 #2
0
 //是否在稿件搜索页仅显示当前登录者的稿件
 public static byte?isPersonal_OnlyMySearch(this HtmlHelper helper)
 {
     if (TicketTool.IsLogin())
     {
         var       LoginAuthor   = JsonConvert.DeserializeObject <AuthorInfoEntity>(TicketTool.GetUserData());
         DataTable PersonalSetDT = GetSiteSetCfg.GetSitePersonalSet(ConfigurationManager.AppSettings["SiteID"], LoginAuthor.AuthorID.ToString());
         return(Convert.ToByte(PersonalSetDT.Rows[0]["Personal_OnlyMySearch"]));
     }
     else
     {
         return(0);
     }
 }
예제 #3
0
        //是否根据处理时间对稿件排序
        public static byte?isPersonal_Order(this HtmlHelper helper)
        {
            if (TicketTool.IsLogin())
            {
                var       LoginAuthor   = JsonConvert.DeserializeObject <AuthorInfoEntity>(TicketTool.GetUserData());
                DataTable PersonalSetDT = GetSiteSetCfg.GetSitePersonalSet(ConfigurationManager.AppSettings["SiteID"], LoginAuthor.AuthorID.ToString());

                try
                {
                    return(Convert.ToByte(PersonalSetDT.Rows[0]["Personal_Order"]));
                }
                catch (Exception)
                {
                    string sql = "insert into SitePersonalSettings(SiteID,EditorID,Personal_Order,Personal_OnlyMySearch) values('" + ConfigurationManager.AppSettings["SiteID"] + "','" + LoginAuthor.AuthorID + "',0,0)";
                    SQLiteHelper.ExeSql(sql);
                    PersonalSetDT = GetSiteSetCfg.GetSitePersonalSet(ConfigurationManager.AppSettings["SiteID"], LoginAuthor.AuthorID.ToString());
                    return(Convert.ToByte(PersonalSetDT.Rows[0]["Personal_Order"]));
                }
            }
            else
            {
                return(0);
            }
        }
예제 #4
0
        /// <summary>
        /// 作者注册时是否需要激活
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string isRegAct(this HtmlHelper helper)
        {
            DataTable GlobalSetDT = GetSiteSetCfg.GetSiteGlobalSet(ConfigurationManager.AppSettings["SiteID"].ToString());

            return(GlobalSetDT.Rows[0]["IsEnableRegActivate"].ToString());
        }
예제 #5
0
        /// <summary>
        /// 是否在编辑部工作量中使用按组统计
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string isStatByGroup(this HtmlHelper helper)
        {
            DataTable GlobalSetDT = GetSiteSetCfg.GetSiteGlobalSet(ConfigurationManager.AppSettings["SiteID"].ToString());

            return(GlobalSetDT.Rows[0]["IsStatByGroup"].ToString());
        }
예제 #6
0
        /// <summary>
        /// 是否允许专家查看历史审稿信息
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string isViewHistoryFlow(this HtmlHelper helper)
        {
            DataTable GlobalSetDT = GetSiteSetCfg.GetSiteGlobalSet(ConfigurationManager.AppSettings["SiteID"].ToString());

            return(GlobalSetDT.Rows[0]["ShowHistoryFlowInfoForExpert"].ToString());
        }
예제 #7
0
        /// <summary>
        /// 下载文章时是否验证登录状态
        /// </summary>
        /// <param name="helper"></param>
        /// <returns></returns>
        public static string isLoginVerify(this HtmlHelper helper)
        {
            DataTable GlobalSetDT = GetSiteSetCfg.GetSiteGlobalSet(ConfigurationManager.AppSettings["SiteID"].ToString());

            return(GlobalSetDT.Rows[0]["IsStopNotLoginDownPDF"].ToString());
        }