Esempio n. 1
0
        public string BuildAccessTypeString(string operationCode, string userCode, string codes, string createUserColumnName)
        {
            string     text = "";
            string     functionStructureParentCode = SystemManageDAO.GetFunctionStructureParentCode(operationCode);
            string     queryString = string.Format(" select accessRange.groupCode,SystemGroup.FullID,RoleLevel from accessRange left join SystemGroup on accessRange.GroupCode=SystemGroup.GroupCode where OperationCode = '{0}' and (( AccessRangeType=0 and relationCode = '{1}' ) or ( AccessRangeType=1 and relationCode in ( {2} ) )  ) ", new object[] { operationCode, userCode, codes });
            QueryAgent agent       = new QueryAgent();
            DataSet    set         = agent.ExecSqlForDataSet(queryString);

            agent.Dispose();
            foreach (DataRow row in set.Tables[0].Rows)
            {
                if (!row.IsNull("FullID"))
                {
                    string text4 = row["FullID"].ToString();
                    int    num   = 0;
                    if (!row.IsNull("RoleLevel"))
                    {
                        num = (int)row["RoleLevel"];
                    }
                    if (num == 0)
                    {
                        text = text + string.Format("or (CaseCode in ( Select a2.CaseCode from  workflowCase a2 where a2.ProcedureCode in(select c1.ProcedureCode from WorkFlowProcedure c1 where isnull(c1.SysType, '') = '') and exists(select 1 from SystemGroup a1 where a1.GroupName in\t(dbo.GetProcedureNameByCaseCode(a2.CaseCode))\tand a1.ParentCode in (select a.GroupCode from SystemGroup a where a.GroupName =dbo.GetProjectNameByCaseCode(a2.CaseCode) and a.classcode='{1}') and a1.FullID like '{0}%'))\t)", text4, functionStructureParentCode);
                    }
                }
            }
            return(text);
        }
Esempio n. 2
0
        /// <summary>
        /// 原先的到点

        /// </summary>
        /// <param name="operationCode"></param>
        /// <param name="userCode"></param>
        /// <param name="stationCodes"></param>
        /// <param name="tableName"></param>
        /// <param name="keyColumnName"></param>
        /// <returns></returns>
        public static string BuildAccessRangeString(string operationCode, string userCode, string stationCodes, string tableName, string keyColumnName)
        {
            string classCode = SystemManageDAO.GetFunctionStructureParentCode(operationCode);
            string codes     = BuildStationCodeString(stationCodes);

            return(BuildAccessResourceString(operationCode, classCode, userCode, codes, tableName, keyColumnName));
        }
Esempio n. 3
0
        public static string BuildAccessRangeStringNoGroupCode(string operationCode, string userCode, string stationCodes, string tableName, string keyColumnName, string typeColumnName, string createUserColumnName)
        {
            string classCode = SystemManageDAO.GetFunctionStructureParentCode(operationCode);
            string codes     = BuildStationCodeString(stationCodes);
            string text3     = BuildAccessResourceString(operationCode, classCode, userCode, codes, tableName, keyColumnName, createUserColumnName);
            string text4     = BuildAccessTypeStringNoGroupCode(operationCode, classCode, userCode, codes, tableName, keyColumnName, typeColumnName, createUserColumnName);

            return(string.Format("( {0}  {1}   )", text3, text4));
        }