示例#1
0
        /// <summary>
        /// 查询功能列表
        /// </summary>
        /// <param name="funcCode"></param>
        /// <param name="funcName"></param>
        /// <returns></returns>
        public DataSet QueryFunctions(string funcCode, string funcName)
        {
            string strSql = @" SELECT  *
                            FROM    dbo.TBLFUNCTION 
                            WHERE   1 = 1 ";

            if (!string.IsNullOrEmpty(funcCode))
            {
                strSql += " and p.functionkey = FunCode ";
            }
            if (!string.IsNullOrEmpty(funcName))
            {
                strSql += " and p.functionname = FunName ";
            }
            strSql += " ORDER BY functionorder ";
            string[] paramNames  = new string[2];
            object[] paramValues = new object[2];

            paramNames[0] = "FunCode";
            paramNames[1] = "FunName";

            paramValues[0] = funcCode;
            paramValues[1] = funcName;
            SqlDBBroker broker = new SqlDBBroker();

            broker.Open();
            DataSet dst = broker.ExecuteDataset(strSql);

            broker.Close();
            return(dst);
        }
示例#2
0
        public PersonEntity GetPersonInfo(string userName, string passWord)
        {
            PersonEntity pe     = new PersonEntity();
            string       strSql = @" SELECT  * 
                                FROM    TBLPERSON where personaccount=@UserName and personpassword=@PassWord";

            string[] paramName  = new string[2];
            object[] paramValue = new object[2];
            paramName[0] = "UserName";
            paramName[1] = "PassWord";

            paramValue[0] = userName;
            paramValue[1] = passWord;
            SqlDBBroker broker = new SqlDBBroker();

            broker.Open();
            DataSet dst = broker.ExecuteDataset(strSql, CommandType.Text, paramName, paramValue);

            broker.Close();
            if (dst != null && dst.Tables[0] != null && dst.Tables[0].Rows.Count > 0)
            {
                return(this.DataRow2Person(dst.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
示例#3
0
        public PersonEntity GetPersonInfo(string personID)
        {
            PersonEntity pe     = new PersonEntity();
            string       strSql = @" SELECT  *  
                                FROM    TBLPERSON where oid=@OID ";

            string[] paramName  = new string[1];
            object[] paramValue = new object[1];
            paramName[0] = "OID";

            paramValue[0] = personID;
            SqlDBBroker broker = new SqlDBBroker();

            broker.Open();
            DataSet dst = broker.ExecuteDataset(strSql, CommandType.Text, paramName, paramValue);

            broker.Close();
            if (dst != null && dst.Tables[0] != null && dst.Tables[0].Rows.Count > 0)
            {
                return(this.DataRow2Person(dst.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
示例#4
0
        public DataSet GetAllFunctions()
        {
            string      strSql = " SELECT * FROM TBLFUNCTION  ORDER BY functionorder ";
            SqlDBBroker broker = new SqlDBBroker();

            broker.Open();
            DataSet dst = broker.ExecuteDataset(strSql);

            broker.Close();
            return(dst);
        }
示例#5
0
        public FunctionEntity GetFunc(string oid)
        {
            string strSQL = @" SELECT * FROM TBLFUNCTION WHERE oid=@OID ";

            string[] paramNames  = new string[1];
            object[] paramValues = new object[1];

            paramNames[0]  = "OID";
            paramValues[0] = oid;
            SqlDBBroker broker = new SqlDBBroker();

            broker.Open();
            DataSet dst = broker.ExecuteDataset(strSQL, CommandType.Text, paramNames, paramValues);

            broker.Close();
            if (dst != null && dst.Tables[0] != null && dst.Tables[0].Rows.Count > 0)
            {
                return(Datarow2Entity(dst.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }