/// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tSysConfig">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable(TSysConfigVo tSysConfig, int iIndex, int iCount)
        {
            string strSQL = " select t.*,rownum rowno from T_SYS_CONFIG t {0} ";

            strSQL = String.Format(strSQL, BuildWhereStatement(tSysConfig));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tSysConfig">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TSysConfigVo tSysConfig)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tSysConfig, TSysConfigVo.T_SYS_CONFIG_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tSysConfig.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        localUserID.Value     = base.LogInfo.UserInfo.ID;
        lbWecomeUserName.Text = base.LogInfo.UserInfo.REAL_NAME;

        TSysConfigVo objSysConfigVo = new TSysConfigVo();

        objSysConfigVo.CONFIG_CODE = "CopyRight";
        objSysConfigVo             = new TSysConfigLogic().Details(objSysConfigVo);
        copyright = objSysConfigVo.REMARK;

        //定义结果
        string strResult = "";

        //获取属性类别
        if (Request["type"] != null && Request["type"].ToString() == "getMenu")
        {
            if (Request["localUserID"] == null)
            {
                return;
            }

            strResult = getMenu(Request["localUserID"].ToString());
            Response.Write(strResult);
            Response.End();
        }
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        TSysConfigVo objSysConfigVo = new TSysConfigVo();

        objSysConfigVo.CONFIG_CODE = "CopyRight";
        objSysConfigVo             = new TSysConfigLogic().Details(objSysConfigVo);
        copyright = objSysConfigVo.REMARK;
        //BuildMainTopMemu();

        LoadDivModle();
    }
    /// <summary>
    /// 是否开始页面权限(系统变量中的系统开关量的"页面权限开关")
    /// </summary>
    /// <returns></returns>
    protected static bool IsOpenPagePermissions()
    {
        TSysConfigVo objSysConfigVo = new TSysConfigVo();

        objSysConfigVo.CONFIG_CODE = "PagePermissions";
        objSysConfigVo             = new TSysConfigLogic().Details(objSysConfigVo);
        if (objSysConfigVo.CONFIG_VALUE != "1")
        {
            return(false);
        }
        return(true);
    }
        /// <summary>
        /// 常规过滤配置
        /// </summary>
        /// <param name="strUpLimit">上限</param>
        /// <param name="strDownLimit">下限</param>
        /// <returns></returns>
        public bool EditConfig(TSysConfigVo strUpLimit, TSysConfigVo strDownLimit)
        {
            ArrayList arr = new ArrayList()
            {
            };
            string strUpLimitSQL = SqlHelper.BuildUpdateExpress(strUpLimit, TSysConfigVo.T_SYS_CONFIG_TABLE);

            strUpLimitSQL += string.Format(" where ID='{0}' ", strUpLimit.ID);
            arr.Add(strUpLimitSQL);

            string strDownLimitSQL = SqlHelper.BuildUpdateExpress(strDownLimit, TSysConfigVo.T_SYS_CONFIG_TABLE);

            strDownLimitSQL += string.Format(" where ID='{0}' ", strDownLimit.ID);
            arr.Add(strDownLimitSQL);
            return(ExecuteSQLByTransaction(arr));
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        TSysConfigVo objSysConfigVo = new TSysConfigVo();

        objSysConfigVo.CONFIG_CODE = "CopyRight";
        objSysConfigVo             = new TSysConfigLogic().Details(objSysConfigVo);
        copyright = objSysConfigVo.REMARK;
        if (Request.QueryString["logout"] != null)
        {
            base.WriteLog(i3.ValueObject.ObjectBase.LogType.LogOut, LogInfo.UserInfo.ID, LogInfo.UserInfo.USER_NAME + "登出系统成功!");
            if (LogInfo.UserInfo.ID != "")
            {
                new i3.BusinessLogic.Sys.General.TSysUserStatusLogic().Delete(LogInfo.UserInfo.ID);
            }
            Session.Remove(KEY_CACHEOPERATOR);
        }
    }
        /// <summary>
        /// 常规过滤配置
        /// </summary>
        /// <param name="tSysConfig">配置对象</param>
        /// <param name="strUpLimit">上限</param>
        /// <param name="strDownLimit">下限</param>
        /// <returns></returns>
        public bool CreateConfig(TSysConfigVo tSysConfig, TSysConfigVo strUpLimit, TSysConfigVo strDownLimit)
        {
            ArrayList arr = new ArrayList()
            {
            };

            //常规过滤
            tSysConfig.ID = GetSerialNumber("config_id");
            string strFilterSQL = SqlHelper.BuildInsertExpress(tSysConfig, TSysConfigVo.T_SYS_CONFIG_TABLE, TSysConfigVo.CREATE_TIME_FIELD);

            arr.Add(strFilterSQL);
            //常规过滤上限
            strUpLimit.ID = GetSerialNumber("config_id");
            string strFilterUp = SqlHelper.BuildInsertExpress(strUpLimit, TSysConfigVo.T_SYS_CONFIG_TABLE);

            arr.Add(strFilterUp);
            //常规过滤下限
            strDownLimit.ID = GetSerialNumber("config_id");
            string strFilterDown = SqlHelper.BuildInsertExpress(strDownLimit, TSysConfigVo.T_SYS_CONFIG_TABLE);

            arr.Add(strFilterDown);

            return(ExecuteSQLByTransaction(arr));
        }
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tSysConfig">对象条件</param>
 /// <returns>对象</returns>
 public TSysConfigVo Details(TSysConfigVo tSysConfig)
 {
     return(access.Details(tSysConfig));
 }
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tSysConfig">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TSysConfigVo tSysConfig)
 {
     return(access.GetSelectResultCount(tSysConfig));
 }
 public TSysConfigLogic(TSysConfigVo _tSysConfig)
 {
     tSysConfig = _tSysConfig;
     access     = new TSysConfigAccess();
 }
 /// <summary>
 /// 常规过滤配置
 /// </summary>
 /// <param name="strUpLimit">上限</param>
 /// <param name="strDownLimit">下限</param>
 /// <returns></returns>
 public bool EditConfig(TSysConfigVo objUpLimit, TSysConfigVo objDownLimit)
 {
     return(access.EditConfig(objUpLimit, objDownLimit));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tSysConfig">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TSysConfigVo tSysConfig)
 {
     return(access.Edit(tSysConfig));
 }
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tSysConfig">对象条件</param>
        /// <returns>对象</returns>
        public TSysConfigVo Details(TSysConfigVo tSysConfig)
        {
            string strSQL = "select * from  T_SYS_CONFIG " + this.BuildWhereStatement(tSysConfig);

            return(SqlHelper.ExecuteObject(new TSysConfigVo(), strSQL));
        }
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tSysConfig"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TSysConfigVo tSysConfig)
 {
     return(access.SelectByTable(tSysConfig));
 }
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tSysConfig">对象</param>
 /// <returns></returns>
 public TSysConfigVo SelectByObject(TSysConfigVo tSysConfig)
 {
     return(access.SelectByObject(tSysConfig));
 }
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tSysConfig"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TSysConfigVo tSysConfig)
        {
            string strSQL = "select * from T_SYS_CONFIG " + this.BuildWhereStatement(tSysConfig);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tSysConfig"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TSysConfigVo tSysConfig)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tSysConfig)
            {
                //编号
                if (!String.IsNullOrEmpty(tSysConfig.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tSysConfig.ID.ToString()));
                }
                //配置名
                if (!String.IsNullOrEmpty(tSysConfig.CONFIG_TEXT.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND CONFIG_TEXT like '%{0}%'", tSysConfig.CONFIG_TEXT.ToString()));
                }
                //配置编码
                if (!String.IsNullOrEmpty(tSysConfig.CONFIG_CODE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND CONFIG_CODE = '{0}'", tSysConfig.CONFIG_CODE.ToString()));
                }
                //配置值
                if (!String.IsNullOrEmpty(tSysConfig.CONFIG_VALUE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND CONFIG_VALUE = '{0}'", tSysConfig.CONFIG_VALUE.ToString()));
                }
                //配置类型
                if (!String.IsNullOrEmpty(tSysConfig.CONFIG_TYPE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND CONFIG_TYPE = '{0}'", tSysConfig.CONFIG_TYPE.ToString()));
                }
                //创建人ID
                if (!String.IsNullOrEmpty(tSysConfig.CREATE_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND CREATE_ID = '{0}'", tSysConfig.CREATE_ID.ToString()));
                }
                //创建时间
                if (!String.IsNullOrEmpty(tSysConfig.CREATE_TIME.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND CREATE_TIME = '{0}'", tSysConfig.CREATE_TIME.ToString()));
                }
                //备注
                if (!String.IsNullOrEmpty(tSysConfig.REMARK.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK = '{0}'", tSysConfig.REMARK.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tSysConfig.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tSysConfig.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tSysConfig.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tSysConfig.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tSysConfig.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tSysConfig.REMARK3.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tSysConfig">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TSysConfigVo> SelectByObject(TSysConfigVo tSysConfig, int iIndex, int iCount)
        {
            string strSQL = String.Format("select t.* from (select * from T_SYS_CONFIG) t " + this.BuildWhereStatement(tSysConfig)) + " order by id desc";

            return(SqlHelper.ExecuteObjectList(tSysConfig, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tSysConfig">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TSysConfigVo> SelectByObject(TSysConfigVo tSysConfig, int iIndex, int iCount)
 {
     return(access.SelectByObject(tSysConfig, iIndex, iCount));
 }
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TSysConfigVo tSysConfig)
 {
     return(access.Create(tSysConfig));
 }
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tSysConfig">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TSysConfigVo tSysConfig, int iIndex, int iCount)
 {
     return(access.SelectByTable(tSysConfig, iIndex, iCount));
 }
 /// <summary>
 /// 常规过滤配置
 /// </summary>
 /// <param name="tSysConfig">配置对象</param>
 /// <param name="strUpLimit">上限</param>
 /// <param name="strDownLimit">下限</param>
 /// <returns></returns>
 public bool CreateConfig(TSysConfigVo tSysConfig, TSysConfigVo objUpLimit, TSysConfigVo objDownLimit)
 {
     return(access.CreateConfig(tSysConfig, objUpLimit, objDownLimit));
 }
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tSysConfig">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TSysConfigVo tSysConfig)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tSysConfig, TSysConfigVo.T_SYS_CONFIG_TABLE, TSysConfigVo.CREATE_TIME_FIELD);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tSysConfig">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TSysConfigVo tSysConfig)
        {
            string strSQL = "select Count(*) from T_SYS_CONFIG " + this.BuildWhereStatement(tSysConfig);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }