DataProcessorService

    public IDataReader GetFunctionInfo(int functionId)
    {
       this.PoolConnect();
       SqlParameter para = new SqlParameter("@FUNCTION_ID", functionId);
       return SqlHelper.ExecuteReader(this.Connection, CommandType.Text, "SELECT * FROM FND_FORM_FUNCTIONS_VL WHERE FUNCTION_ID=@FUNCTION_ID", new SqlParameter[] { para });
    }
    public IDataReader GetSubMenus(int menuId)
        {
            this.Connect();
            SqlParameter para = new SqlParameter("@MENU_ID", menuId);
            return SqlHelper.ExecuteReader(this.Connection, CommandType.Text, "SELECT * FROM FND_MENU_ENTRIES_VL WHERE MENU_ID=@MENU_ID ORDER BY ENTRY_SEQUENCE", new SqlParameter[] { para });
        }

    public class DataProcessorService
    {
        private static IDataProcessorService objProvider = null;

        static DataProcessorService()
        {
            CreateProvider();
        }

        private static void CreateProvider()
        {
            //objProvider = new SqlClient.SqlDataProvider();
            //objProvider = new OleDbClient.OleDbDataProvider();
            objProvider = AdminDataProvider.Instance();
        }

        public static IDataProcessorService Instance()
        {
            return objProvider;
        }
    }

posted @ 2010-09-19 17:01  leslie116  阅读(200)  评论(0编辑  收藏  举报