⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin.asmx.vb

📁 系统概要: 本系统采用VB.NET开发. 开发平台:Windows XP Professional SP2 (English Version) 开发环境:Visual Studio .NET
💻 VB
字号:

'
'    Copyright(C)2006,济南大学材料科学与工程学院
'    All right reserved.
'
'    文件名称:Admin.asmx.vb
'    文件标识:
'    摘    要:管理
'
'    当前版本:2.0.0
'    作    者:梁  海
'    完成日期:2006-12-7
'
'    取代版本:
'    原作者  :
'    完成日期:
'
'    修改历史:
'
Imports System.Web.Services
Imports System.Text

<System.Web.Services.WebService(Namespace:="http://mse.ujn.edu.cn/autocad/Admin")> _
Public Class Admin
    Inherits System.Web.Services.WebService

#Region " Web Services Designer Generated Code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Web Services Designer.
        InitializeComponent()

        'Add your own initialization code after the InitializeComponent() call

    End Sub

    'Required by the Web Services Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Web Services Designer
    'It can be modified using the Web Services Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        components = New System.ComponentModel.Container
    End Sub

    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        'CODEGEN: This procedure is required by the Web Services Designer
        'Do not modify it using the code editor.
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

#End Region

    '
    '    函数名称:ValidateAdmin(ByVal Name As String, ByVal Password As String) As Boolean
    '    摘    要:验证管理员信息
    ' 
    <WebMethod(Description:="验证管理员信息,返回True表示验证成功,False表示验证失败.")> _
    Public Function ValidateAdmin(ByVal Name As String, ByVal Password As String) As Boolean

        Dim oAdmin As Administrator
        oAdmin = New Administrator(Name, Password)

        Return oAdmin.CheckPassword()

    End Function

    '
    '    函数名称:AdminChoose(ByVal ChooseItem As Choose) As Boolean
    '    摘    要:管理选择题
    ' 
    <WebMethod(Description:="管理选择题,返回True表示操作成功,False表示操作失败.")> _
    Public Function AdminChoose(ByVal ChooseItem As Choose, ByVal OptionItem As AdminOption) As Boolean

        Dim IsSuccess As Boolean
        Select Case OptionItem
            Case AdminOption.SaveToDB
                IsSuccess = ChooseItem.SaveToDB()
            Case AdminOption.UpdateToDB
                IsSuccess = ChooseItem.UpdateToDB()
        End Select

        Return IsSuccess

    End Function

    '
    '    函数名称:AdminVacancy(ByVal VacancyItem As Vacancy, ByVal OptionItem As AdminOption) As Boolean
    '    摘    要:管理填空题
    ' 
    <WebMethod(Description:="管理填空题,返回True表示操作成功,False表示操作失败.")> _
    Public Function AdminVacancy(ByVal VacancyItem As Vacancy, ByVal OptionItem As AdminOption) As Boolean

        Dim IsSuccess As Boolean
        Select Case OptionItem
            Case AdminOption.SaveToDB
                IsSuccess = VacancyItem.SaveToDB()
            Case AdminOption.UpdateToDB
                IsSuccess = VacancyItem.UpdateToDB()
        End Select

        Return IsSuccess

    End Function

    '
    '    函数名称:AdminDrawing(ByVal DrawingItem As Drawing, ByVal OptionItem As AdminOption) As Boolean
    '    摘    要:管理作图题
    ' 
    <WebMethod(Description:="管理作图题,返回True表示操作成功,False表示操作失败.")> _
    Public Function AdminDrawing(ByVal DrawingItem As Drawing, ByVal OptionItem As AdminOption) As Boolean

        Dim IsSuccess As Boolean
        Select Case OptionItem
            Case AdminOption.SaveToDB
                IsSuccess = DrawingItem.SaveToDB()
            Case AdminOption.UpdateToDB
                IsSuccess = DrawingItem.UpdateToDB()
        End Select

        Return IsSuccess

    End Function

End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -