コード例 #1
0
ファイル: BusFacCore.cs プロジェクト: haythamallos/analyzer
        /// <summary>
        /// UserRoleGet
        /// </summary>
        /// <param name="">pLngUserRoleID</param>
        /// <returns>UserRole</returns>
        ///
        public UserRole UserRoleGet(long pLngUserRoleID)
        {
            UserRole user_role = new UserRole()
            {
                UserRoleID = pLngUserRoleID
            };
            bool          bConn = false;
            SqlConnection conn  = getDBConnection();

            if (conn != null)
            {
                BusUserRole busUserRole = null;
                busUserRole = new BusUserRole(conn);
                busUserRole.Load(user_role);
                // close the db connection
                bConn     = CloseConnection(conn);
                _hasError = busUserRole.HasError;
                if (busUserRole.HasError)
                {
                    // error
                    ErrorCode error = new ErrorCode();
                }
            }
            return(user_role);
        }
コード例 #2
0
ファイル: BusFacCore.cs プロジェクト: haythamallos/analyzer
        /// <summary>
        /// UserRoleGetList
        /// </summary>
        /// <param name="">pEnumUserRole</param>
        /// <returns>ArrayList</returns>
        ///
        public ArrayList UserRoleGetList(EnumUserRole pEnumUserRole)
        {
            ArrayList     items = null;
            bool          bConn = false;
            SqlConnection conn  = getDBConnection();

            if (conn != null)
            {
                BusUserRole busUserRole = null;
                busUserRole = new BusUserRole(conn);
                items       = busUserRole.Get(pEnumUserRole);
                // close the db connection
                bConn     = CloseConnection(conn);
                _hasError = busUserRole.HasError;
                if (busUserRole.HasError)
                {
                    // error
                    ErrorCode error = new ErrorCode();
                }
            }
            return(items);
        }
コード例 #3
0
ファイル: BusFacCore.cs プロジェクト: haythamallos/analyzer
        /// <summary>
        /// UserRoleRemove
        /// </summary>
        /// <param name="">pUserRoleID</param>
        /// <returns>void</returns>
        ///
        public void UserRoleRemove(long pUserRoleID)
        {
            bool bConn = false;

            SqlConnection conn = getDBConnection();

            if (conn != null)
            {
                UserRole user_role = new UserRole();
                user_role.UserRoleID = pUserRoleID;
                BusUserRole bus = null;
                bus = new BusUserRole(conn);
                bus.Delete(user_role);
                // close the db connection
                bConn     = CloseConnection(conn);
                _hasError = bus.HasError;
                if (bus.HasError)
                {
                    // error
                    ErrorCode error = new ErrorCode();
                }
            }
        }
コード例 #4
0
ファイル: BusFacCore.cs プロジェクト: haythamallos/analyzer
        //------------------------------------------
        /// <summary>
        /// UserRoleCreateOrModify
        /// </summary>
        /// <param name="">pUserRole</param>
        /// <returns>long</returns>
        ///
        public long UserRoleCreateOrModify(UserRole pUserRole)
        {
            long          lID   = 0;
            bool          bConn = false;
            SqlConnection conn  = getDBConnection();

            if (conn != null)
            {
                BusUserRole busUserRole = null;
                busUserRole = new BusUserRole(conn);
                busUserRole.Save(pUserRole);
                // close the db connection
                bConn     = CloseConnection(conn);
                lID       = pUserRole.UserRoleID;
                _hasError = busUserRole.HasError;
                if (busUserRole.HasError)
                {
                    // error
                    ErrorCode error = new ErrorCode();
                }
            }
            return(lID);
        }