Class DatabaseHandler
The class to handle Database.
處理數據庫的類別。
Inheritance
Namespace: Votanic.vNet.Database
Assembly: Votanic.vNet.dll
Syntax
public class DatabaseHandler
Properties
currentUser
Return the current login user.
傳回目前登入的使用者。
Declaration
public User currentUser { get; }
Property Value
| Type | Description |
|---|---|
| User |
hasAuthority
Return the authority for fully access database.
傳回資料庫的完全存取權限。
Declaration
public bool hasAuthority { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
AccessAuthority(String)
Set the access authority for fully access database.
設定資料庫的完全存取權限。
AccessAuthority("Authority")
Declaration
public bool AccessAuthority(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | Unqiue identifier |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Clear()
Clear the databases.
清空數據庫。
Declaration
public void Clear()
CreateApp(String, String, String, String)
Create app or get the existing app from app table in system database.
在系統數據庫中的應用程式表格創造應用程式或取得已存在應用程式。
CreateApp("QWERTYUIOP", "VotanicXR", "Votanic Project")
Declaration
public App CreateApp(string id, string name, string desc = "", string imagePath = "")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | Application identifier |
| System.String | name | Application name |
| System.String | desc | Description |
| System.String | imagePath | Icon image path |
Returns
| Type | Description |
|---|---|
| App |
CreateDB(String, String)
Create environment and application database if the paths do not exist.
當指定的路徑不存在時創造環境及應用程式數據庫。
CreateDB("../Resources/Database/sysDB.db", "../Resources/Database/appDB.db")
Declaration
public void CreateDB(string sysDBPath, string appDBPath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | sysDBPath | Path of system database |
| System.String | appDBPath | Path of application database |
CreateEnrollment(Int32, Int32, String)
Create enrollment or get the existing enrollment from enrollment table in system database.
在系統數據庫中的登記表格創造登記或取得已存在登記。
CreateEnrollment("Chan Tai Man", "Chan Siu Man", "Votanic Project")
Declaration
public Enrollment CreateEnrollment(int userID, int playerID, string appID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | userID | User ID |
| System.Int32 | playerID | Player ID |
| System.String | appID | Application ID |
Returns
| Type | Description |
|---|---|
| Enrollment |
CreateMetaInfo(String, Int32, String, String)
Create metaInfo or get the existing meta info from meta info table in application database.
在應用程式數據庫中的元信息表格創造元信息或取得已存在元信息。
CreateMetaInfo("Task", 1, "Event", "ABC")
Declaration
public MetaInfo CreateMetaInfo(string table, int refID, string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | table | Related table name |
| System.Int32 | refID | ID on the table |
| System.String | key | Attribute name |
| System.String | value | Content of attribute |
Returns
| Type | Description |
|---|---|
| MetaInfo |
CreatePlayer(String, String, String, String, String)
Create player or get the existing player from player table in system database.
在系統數據庫中的玩家表格創造玩家或取得已存在玩家。
CreatePlayer("AC1234", "********", "123456789", "Chan Tai Man", "ABC")
Declaration
public Player CreatePlayer(string account, string password, string smartID = "", string fullName = "", string remark = "")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | account | Player account for joining the session |
| System.String | password | Password for joining the session |
| System.String | smartID | Smart identifier for joining the session |
| System.String | fullName | Full name of player |
| System.String | remark | Remark of player |
Returns
| Type | Description |
|---|---|
| Player |
CreatePlayerSession(Int32, Int32, Int32)
Create player session or get the existing player session from player session table in application database.
在應用程式數據庫中的玩家場節表格創造玩家場節或取得已存在玩家場節。
CreatePlayerSession(0, "AC1234", "PY5678")
Declaration
public PlayerSession CreatePlayerSession(int sessionID, int userID, int playerID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | sessionID | Seesion ID |
| System.Int32 | userID | User ID |
| System.Int32 | playerID | Player ID |
Returns
| Type | Description |
|---|---|
| PlayerSession |
CreateRole(String, String)
Create role or get the existing role from role table in system database.
在系統數據庫中的角色表格創造角色或取得已存在角色。
CreateRole("RoleA", "ABC")
Declaration
public Role CreateRole(string name, string desc = "")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Role name |
| System.String | desc | Description |
Returns
| Type | Description |
|---|---|
| Role |
CreateSession(String, String)
Create session or get the existing session from session table in application database.
在應用程式數據庫中的場節表格創造場節或取得已存在場節。
CreateSession("31/05/2020 07:01:33", "31/05/2020 07:02:44")
Declaration
public Session CreateSession(string start, string end)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | start | Start time of session |
| System.String | end | End time of session |
Returns
| Type | Description |
|---|---|
| Session |
CreateSessionDetail(Int32, Int32, Int32, String, String)
Create session or get the existing session from session table in application database.
在應用程式數據庫中的場節詳述表格創造場節詳述或取得已存在場節詳述。
CreateSessionDetail(0, 0, 0, "ABC", "31/05/2020 07:05:55")
Declaration
public SessionDetail CreateSessionDetail(int playerSessionID, int index, int taskID, string taskResult, string timestamp)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | playerSessionID | Player session ID |
| System.Int32 | index | Session Details Index |
| System.Int32 | taskID | Task ID |
| System.String | taskResult | Result of task |
| System.String | timestamp | Date time when the task is recorded |
Returns
| Type | Description |
|---|---|
| SessionDetail |
CreateTask(String, Int32, Single, String)
Create task or get the existing task from task table in application database.
在應用程式數據庫中的任務表格創造任務或取得已存在任務。
CreateTask("Say goodbye", 0, 100, "QWERTYUIOP")
Declaration
public Task CreateTask(string name, int index, float score, string app = "")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Task name |
| System.Int32 | index | Task index |
| System.Single | score | Task score |
| System.String | app | App ID or Name |
Returns
| Type | Description |
|---|---|
| Task |
CreateUser(String, String, String, String, String, String)
Create user or get the existing user from user table in system database.
在系統數據庫中的使用者表格創造使用者或取得已存在使用者。
CreateUser("AC1234", "********", "123456789", "Chan Tai Man", "RoleA", "ABC")
Declaration
public User CreateUser(string userName, string password, string smartID = "", string fullName = "", string role = "", string remark = "")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | userName | User name for login |
| System.String | password | Password for login |
| System.String | smartID | Smart ID for login |
| System.String | fullName | Full name of user |
| System.String | role | Role ID or Name |
| System.String | remark | Remark of user |
Returns
| Type | Description |
|---|---|
| User |
DeleteAllApps()
Delete all apps from app table in system database.
在系統數據庫中的應用程式表格刪除所有應用程式。
Declaration
public void DeleteAllApps()
DeleteAllEnrollments()
Delete all enrollments from enrollment table in system database.
在系統數據庫中的登記表格刪除所有登記。
Declaration
public void DeleteAllEnrollments()
DeleteAllMetaInfos()
Delete all meta infos from meta info table in application database.
在應用程式數據庫中的元信息表格刪除所有元信息。
Declaration
public void DeleteAllMetaInfos()
DeleteAllPlayers()
Delete all players from player table in system database.
在系統數據庫中的玩家表格刪除所有玩家。
Declaration
public void DeleteAllPlayers()
DeleteAllPlayerSessions()
Delete all player sessions from player session table in application database.
在應用程式數據庫中的玩家場節表格刪除所有玩家場節。
Declaration
public void DeleteAllPlayerSessions()
DeleteAllRoles()
Delete all roles from role table in system database.
在系統數據庫中的角色表格刪除所有角色。
Declaration
public void DeleteAllRoles()
DeleteAllSessionDetails()
Delete all session details from session details table in application database.
在應用程式數據庫中的場節詳述表格刪除所有場節詳述。
Declaration
public void DeleteAllSessionDetails()
DeleteAllSessions()
Delete all sessions from session table in application database.
在應用程式數據庫中的場節表格刪除所有場節。
Declaration
public void DeleteAllSessions()
DeleteAllTasks()
Delete all tasks from task table in application database.
在應用程式數據庫中的任務表格刪除所有任務。
Declaration
public void DeleteAllTasks()
DeleteAllUsers()
Delete all users from user table in system database.
在系統數據庫中的使用者表格刪除所有使用者。
Declaration
public void DeleteAllUsers()
DeleteApp(App)
Delete the target app from app table in system database.
在系統數據庫中的應用程式表格刪除指定單一應用程式。
DeleteApp(GetApp())
Declaration
public void DeleteApp(App app)
Parameters
| Type | Name | Description |
|---|---|---|
| App | app | App |
DeleteApps(List<App>)
Delete the target apps from app table in system database.
在系統數據庫中的應用程式表格刪除指定應用程式。
DeleteApps(GetApps())
Declaration
public void DeleteApps(List<App> apps)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<App> | apps | App list |
DeleteEnrollment(Enrollment)
Delete the target enrollment from enrollment table in system database.
在系統數據庫中的登記表格刪除指定單一登記。
DeleteEnrollment(GetEnrollment())
Declaration
public void DeleteEnrollment(Enrollment enrollment)
Parameters
| Type | Name | Description |
|---|---|---|
| Enrollment | enrollment | Enrollment |
DeleteEnrollments(List<Enrollment>)
Delete the target enrollments from enrollment table in system database.
在系統數據庫中的登記表格刪除指定登記。
DeleteEnrollments(GetEnrollments())
Declaration
public void DeleteEnrollments(List<Enrollment> enrollments)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Enrollment> | enrollments | Enrollment list |
DeleteMetaInfo(MetaInfo)
Delete the target meta info from meta info table in application database.
在應用程式數據庫中的元信息表格刪除指定單一元信息。
DeleteMetaInfo(GetMetaInfo())
Declaration
public void DeleteMetaInfo(MetaInfo metaInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaInfo | metaInfo | Meta info |
DeleteMetaInfos(List<MetaInfo>)
Delete the target meta infos from meta info table in application database.
在應用程式數據庫中的元信息表格刪除指定元信息。
DeleteMetaInfos(GetMetaInfos())
Declaration
public void DeleteMetaInfos(List<MetaInfo> metaInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<MetaInfo> | metaInfos | Meta info list |
DeletePlayer(Player)
Delete the target player from player table in system database.
在系統數據庫中的玩家表格刪除指定單一玩家。
DeletePlayer(GetPlayer())
Declaration
public void DeletePlayer(Player player)
Parameters
| Type | Name | Description |
|---|---|---|
| Player | player | Player |
DeletePlayers(List<Player>)
Delete the target players from player table in system database.
在系統數據庫中的玩家表格刪除指定玩家。
DeletePlayers(GetPlayers())
Declaration
public void DeletePlayers(List<Player> players)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Player> | players | Player list |
DeletePlayerSession(PlayerSession)
Delete the target player session from player session table in application database.
在應用程式數據庫中的玩家場節表格刪除指定單一玩家場節。
DeletePlayerSession(GetPlayerSession())
Declaration
public void DeletePlayerSession(PlayerSession session)
Parameters
| Type | Name | Description |
|---|---|---|
| PlayerSession | session | Player session |
DeletePlayerSessions(List<PlayerSession>)
Delete the target player sessions from player session table in application database.
在應用程式數據庫中的玩家場節表格刪除指定玩家場節。
DeletePlayerSessions(GetPlayerSessions())
Declaration
public void DeletePlayerSessions(List<PlayerSession> sessions)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<PlayerSession> | sessions | Player session list |
DeleteRole(Role)
Delete the target role from role table in system database.
在系統數據庫中的角色表格刪除指定單一角色。
DeleteRole(GetRole())
Declaration
public void DeleteRole(Role role)
Parameters
| Type | Name | Description |
|---|---|---|
| Role | role | Role |
DeleteRoles(List<Role>)
Delete the target roles from role table in system database.
在系統數據庫中的角色表格刪除指定角色。
DeleteRoles(GetRoles())
Declaration
public void DeleteRoles(List<Role> roles)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Role> | roles | Role list |
DeleteSession(Session)
Delete the target session from session table in application database.
在應用程式數據庫中的場節表格刪除指定單一場節。
DeleteSession(GetSession())
Declaration
public void DeleteSession(Session session)
Parameters
| Type | Name | Description |
|---|---|---|
| Session | session | Session |
DeleteSessionDetail(SessionDetail)
Delete the target session detail from session details table in application database.
在應用程式數據庫中的場節詳述表格刪除指定單一場節詳述。
DeleteSessionDetail(GetSessionDetail())
Declaration
public void DeleteSessionDetail(SessionDetail sessionDetail)
Parameters
| Type | Name | Description |
|---|---|---|
| SessionDetail | sessionDetail | Session detail |
DeleteSessionDetails(List<SessionDetail>)
Delete the target session details from session details table in application database.
在應用程式數據庫中的場節詳述表格刪除指定場節詳述。
DeleteSessionDetails(GetSessionDetails())
Declaration
public void DeleteSessionDetails(List<SessionDetail> sessionsDetails)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<SessionDetail> | sessionsDetails | Session detail list |
DeleteSessions(List<Session>)
Delete the target sessions from session table in application database.
在應用程式數據庫中的場節表格刪除指定場節。
DeleteSessions(GetSessions())
Declaration
public void DeleteSessions(List<Session> sessions)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Session> | sessions | Session list |
DeleteTask(Task)
Delete the target task from task table in application database.
在應用程式數據庫中的任務表格刪除指定單一任務。
DeleteTask(GetTask())
Declaration
public void DeleteTask(Task task)
Parameters
| Type | Name | Description |
|---|---|---|
| Task | task | Task |
DeleteTasks(List<Task>)
Delete the target tasks from task table in application database.
在應用程式數據庫中的任務表格刪除指定任務。
DeleteTasks(GetTasks())
Declaration
public void DeleteTasks(List<Task> tasks)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Task> | tasks | Task list |
DeleteUser(User)
Delete the target user from user table in system database.
在系統數據庫中的使用者表格刪除指定單一使用者。
DeleteUser(GetUser())
Declaration
public void DeleteUser(User user)
Parameters
| Type | Name | Description |
|---|---|---|
| User | user | User |
DeleteUsers(List<User>)
Delete the target users from user table in system database.
在系統數據庫中的使用者表格刪除指定使用者。
DeleteUsers(GetUsers())
Declaration
public void DeleteUsers(List<User> users)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<User> | users | User list |
GetAllApps()
Get all the apps from app table in system database.
在系統數據庫中的應用程式表格取得所有應用程式。
Declaration
public List<App> GetAllApps()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<App> |
GetAllEnrollments()
Get all the enrollments from enrollment table in system database.
在系統數據庫中的登記表格取得所有登記。
Declaration
public List<Enrollment> GetAllEnrollments()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Enrollment> |
GetAllMetaInfos()
Get all the meta infos from meta info table in application database.
在應用程式數據庫中的所有元信息。
Declaration
public List<MetaInfo> GetAllMetaInfos()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<MetaInfo> |
GetAllPlayers()
Get all the players from player table in system database.
在系統數據庫中的玩家表格取得所有玩家。
Declaration
public List<Player> GetAllPlayers()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Player> |
GetAllPlayerSessions()
Get all the player sessions from player session table in application database.
在應用程式數據庫中的玩家場節表格取得所有玩家場節。
Declaration
public List<PlayerSession> GetAllPlayerSessions()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<PlayerSession> |
GetAllRoles()
Get all the roles from role table in system database.
在系統數據庫中的角色表格取得所有角色。
Declaration
public List<Role> GetAllRoles()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Role> |
GetAllSessionDetails()
Get all the session details from session details table in application database.
在應用程式數據庫中的場節詳述表格取得所有場節詳述。
Declaration
public List<SessionDetail> GetAllSessionDetails()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<SessionDetail> |
GetAllSessions()
Get all the sessions from session table in application database.
在應用程式數據庫中的場節表格取得所有場節。
Declaration
public List<Session> GetAllSessions()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Session> |
GetAllTasks()
Get all the tasks from task table in application database.
在應用程式數據庫中的任務表格取得所有任務。
Declaration
public List<Task> GetAllTasks()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Task> |
GetAllUsers()
Get all the users from user table in system database.
在系統數據庫中的使用者表格取得所有使用者。
Declaration
public List<User> GetAllUsers()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<User> |
GetApp(SearchPattern[])
Get the first app by conditions from app table in system database.
在系統數據庫中的應用程式表格根據條件取得首個應用程式。
GetApp(new SearchPattern(AppKey.ID, Comparison.Equals, "1", false))
Declaration
public App GetApp(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| App |
GetApps(SearchPattern[])
Get the apps by conditions from app table in system database.
在系統數據庫中的應用程式表格根據條件取得應用程式。
GetApps(new SearchPattern(AppKey.ID, Comparison.Equals, "1", false))
Declaration
public List<App> GetApps(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<App> |
GetEnrollment(SearchPattern[])
Get the first enrollment by conditions from enrollment table in system database.
在系統數據庫中的登記表格根據條件取得首個登記。
GetEnrollment(new SearchPattern(EnrollmentKey.ID, Comparison.Equals, "1", false))
Declaration
public Enrollment GetEnrollment(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| Enrollment |
GetEnrollments(SearchPattern[])
Get the enrollments by conditions from enrollment table in system database.
在系統數據庫中的登記表格根據條件取得登記。
GetEnrollments(new SearchPattern(EnrollmentKey.ID, Comparison.Equals, "1", false))
Declaration
public List<Enrollment> GetEnrollments(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Enrollment> |
GetMetaInfo(SearchPattern[])
Get the first meta info by conditions from meta info table in application database.
在應用程式數據庫中的元信息表格根據條件取得首個元信息。
GetMetaInfo(new SearchPattern(MetaInfoKey.ID, Comparison.Equals, "1", false))
Declaration
public MetaInfo GetMetaInfo(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| MetaInfo |
GetMetaInfos(SearchPattern[])
Get the meta infos by conditions from meta info table in application database.
在應用程式數據庫中的元信息表格根據條件取得元信息。
GetMetaInfos(new SearchPattern(MetaInfoKey.ID, Comparison.Equals, "1", false))
Declaration
public List<MetaInfo> GetMetaInfos(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<MetaInfo> |
GetPlayer(SearchPattern[])
Get the first player by conditions from player table in system database.
在系統數據庫中的玩家表格根據條件取得首個玩家。
GetPlayer(new SearchPattern(PlayerKey.ID, Comparison.Equals, "1", false))
Declaration
public Player GetPlayer(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| Player |
GetPlayers(SearchPattern[])
Get the players by conditions from player table in system database.
在系統數據庫中的玩家表格根據條件取得玩家。
GetPlayers(new SearchPattern(PlayerKey.ID, Comparison.Equals, "1", false))
Declaration
public List<Player> GetPlayers(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Player> |
GetPlayerSession(SearchPattern[])
Get the first player session by conditions from player session table in application database.
在應用程式數據庫中的玩家場節表格根據條件取得首個玩家場節。
GetPlayerSession(new SearchPattern(PlayerSessionKey.ID, Comparison.Equals, "1", false))
Declaration
public PlayerSession GetPlayerSession(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| PlayerSession |
GetPlayerSessions(SearchPattern[])
Get the player sessions by conditions from player session table in application database.
在應用程式數據庫中的玩家場節表格根據條件取得玩家場節。
GetPlayerSessions(new SearchPattern(PlayerSessionKey.ID, Comparison.Equals, "1", false))
Declaration
public List<PlayerSession> GetPlayerSessions(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<PlayerSession> |
GetRole(SearchPattern[])
Get the first role by conditions from role table in system database.
在系統數據庫中的角色表格根據條件取得首個角色。
GetRole(new SearchPattern(RoleKey.ID, Comparison.Equals, "1", false))
Declaration
public Role GetRole(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| Role |
GetRoles(SearchPattern[])
Get the roles by conditions from role table in system database.
在系統數據庫中的角色表格根據條件取得角色。
GetRoles(new SearchPattern(RoleKey.ID, Comparison.Equals, "1", false))
Declaration
public List<Role> GetRoles(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Role> |
GetSession(SearchPattern[])
Get the first session by conditions from session table in application database.
在應用程式數據庫中的場節表格根據條件取得首個場節。
GetSession(new SearchPattern(SessionKey.ID, Comparison.Equals, "1", false))
Declaration
public Session GetSession(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| Session |
GetSessionDetail(SearchPattern[])
Get the first session detail by conditions from session details table in application database.
在應用程式數據庫中的場節詳述表格根據條件取得首個場節詳述。
GetSessionDetail(new SearchPattern(SessionDetailKey.ID, Comparison.Equals, "1", false))
Declaration
public SessionDetail GetSessionDetail(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| SessionDetail |
GetSessionDetails(SearchPattern[])
Get the session details by conditions from session details table in application database.
在應用程式數據庫中的場節詳述表格根據條件取得場節詳述。
GetSessionDetails(new SearchPattern(SessionDetailKey.ID, Comparison.Equals, "1", false))
Declaration
public List<SessionDetail> GetSessionDetails(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<SessionDetail> |
GetSessions(SearchPattern[])
Get the sessions by conditions from session table in application database.
在應用程式數據庫中的場節表格根據條件取得場節。
GetSessions(new SearchPattern(SessionKey.ID, Comparison.Equals, "1", false))
Declaration
public List<Session> GetSessions(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Session> |
GetTask(SearchPattern[])
Get the first task by conditions from task table in application database.
在應用程式數據庫中的任務表格根據條件取得首個任務。
GetTask(new SearchPattern(TaskKey.ID, Comparison.Equals, "1", false))
Declaration
public Task GetTask(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| Task |
GetTasks(SearchPattern[])
Get the tasks by conditions from task table in application database.
在應用程式數據庫中的任務表格根據條件取得任務。
GetTasks(new SearchPattern(TaskKey.ID, Comparison.Equals, "1", false))
Declaration
public List<Task> GetTasks(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Task> |
GetUser(SearchPattern[])
Get the first user by conditions from user table in system database.
在系統數據庫中的使用者表格根據條件取得首個使用者。
GetUser(new SearchPattern(UserKey.ID, Comparison.Equals, "1", false))
Declaration
public User GetUser(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| User |
GetUsers(SearchPattern[])
Get the users by conditions from user table in system database.
在系統數據庫中的使用者表格根據條件取得使用者。
GetUsers(new SearchPattern(UserKey.ID, Comparison.Equals, "1", false))
Declaration
public List<User> GetUsers(params SearchPattern[] searchPatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchPattern[] | searchPatterns | Search Pattern |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<User> |
Login(String)
Login by Smart ID.
以智能識別碼登入。
Login("123456789")
Declaration
public bool Login(string smartID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | smartID | Smart ID |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Login(String, String)
Login by User Name and Password.
以使用者名稱及密碼登入。
Login("AC1234", "********")
Declaration
public bool Login(string userName, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | userName | User Name |
| System.String | password | Password |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Logout()
Logout current user.
登出目前使用者。
Declaration
public void Logout()
UpdateApp(App, TableUpdate[])
Update the data of an app from app table in system database. 在系統數據庫中的應用程式表格更新單一應用程式的數據。
UpdateApp(GetApp(), new TableUpdate(AppKey.Name, "ABC"))
Declaration
public void UpdateApp(App app, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| App | app | App |
| TableUpdate[] | updates | Update attributes |
UpdateApps(List<App>, TableUpdate[])
Update the data of apps from app table in system database. 在系統數據庫中的應用程式表格更新應用程式的數據。
UpdateApps(GetApps(), new TableUpdate(AppKey.Name, "ABC"))
Declaration
public void UpdateApps(List<App> apps, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<App> | apps | App list |
| TableUpdate[] | updates | Update attributes |
UpdateEnrollment(Enrollment, TableUpdate[])
Update the data of an enrollment from enrollment table in system database. 在系統數據庫中的登記表格更新單一登記的數據。
UpdateEnrollment(GetEnrollment(), new TableUpdate(EnrollmentKey.UserID, 1))
Declaration
public void UpdateEnrollment(Enrollment enrollment, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| Enrollment | enrollment | Enrollment |
| TableUpdate[] | updates | Update attributes |
UpdateEnrollments(List<Enrollment>, TableUpdate[])
Update the data of enrollments from enrollment table in system database. 在系統數據庫中的登記表格更新登記的數據。
UpdateEnrollments(GetEnrollments(), new TableUpdate(EnrollmentKey.UserID, 1))
Declaration
public void UpdateEnrollments(List<Enrollment> enrollments, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Enrollment> | enrollments | Enrollment list |
| TableUpdate[] | updates | Update attributes |
UpdateMetaInfo(MetaInfo, TableUpdate[])
Update the data of a meta info from meta info table in application database. 在應用程式數據庫中的元信息表格更新單一元信息的數據。
UpdateMetaInfo(GetMetaInfo(), new TableUpdate(MetaInfoKey.Value, "ABC"))
Declaration
public void UpdateMetaInfo(MetaInfo metaInfo, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaInfo | metaInfo | Meta info |
| TableUpdate[] | updates | Update attributes |
UpdateMetaInfos(List<MetaInfo>, TableUpdate[])
Update the data of meta infos from meta info table in application database. 在應用程式數據庫中的元信息表格更新元信息的數據。
UpdateMetaInfos(GetMetaInfos(), new TableUpdate(MetaInfoKey.Value, "ABC"))
Declaration
public void UpdateMetaInfos(List<MetaInfo> metaInfos, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<MetaInfo> | metaInfos | Meta info list |
| TableUpdate[] | updates | Update attributes |
UpdatePlayer(Player, TableUpdate[])
Update the data of an player from player table in system database. 在系統數據庫中的玩家表格更新單一玩家的數據。
UpdatePlayer(GetPlayer(), new TableUpdate(PlayerKey.FullName, "ABC"))
Declaration
public void UpdatePlayer(Player player, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| Player | player | Player |
| TableUpdate[] | updates | Update attributes |
UpdatePlayers(List<Player>, TableUpdate[])
Update the data of players from player table in system database. 在系統數據庫中的玩家表格更新玩家的數據。
UpdatePlayers(GetPlayers(), new TableUpdate(PlayerKey.FullName, "ABC"))
Declaration
public void UpdatePlayers(List<Player> players, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Player> | players | Player list |
| TableUpdate[] | updates | Update attributes |
UpdatePlayerSession(PlayerSession, TableUpdate[])
Update the data of an player session from player session table in application database. 在應用程式數據庫中的玩家場節表格更新單一玩家場節的數據。
UpdatePlayerSession(GetPlayerSession(), new TableUpdate(PlayerSessionKey.UserID, 1))
Declaration
public void UpdatePlayerSession(PlayerSession session, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| PlayerSession | session | Player session |
| TableUpdate[] | updates | Update attributes |
UpdatePlayerSessions(List<PlayerSession>, TableUpdate[])
Update the data of player sessions from player session table in application database. 在應用程式數據庫中的玩家場節表格更新玩家場節的數據。
UpdatePlayerSessions(GetPlayerSessions(), new TableUpdate(PlayerSessionKey.UserID, 1))
Declaration
public void UpdatePlayerSessions(List<PlayerSession> sessions, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<PlayerSession> | sessions | Player session list |
| TableUpdate[] | updates | Update attributes |
UpdateRole(Role, TableUpdate[])
Update the data of a role from role table in system database. 在系統數據庫中的角色表格更新單一角色的數據。
UpdateRole(GetRole(), new TableUpdate(RoleKey.Name, "ABC"))
Declaration
public void UpdateRole(Role role, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| Role | role | Role |
| TableUpdate[] | updates | Update attributes |
UpdateRoles(List<Role>, TableUpdate[])
Update the data of roles from role table in system database. 在系統數據庫中的角色表格更新角色的數據。
UpdateRoles(GetRoles(), new TableUpdate(RoleKey.Name, "ABC"))
Declaration
public void UpdateRoles(List<Role> roles, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Role> | roles | Role list |
| TableUpdate[] | updates | Update attributes |
UpdateSession(Session, TableUpdate[])
Update the data of a session from session table in application database. 在應用程式數據庫中的場節表格更新單一場節的數據。
UpdateSession(GetSession(), new TableUpdate(SessionKey.Start, "31/05/2020 07:02:44"))
Declaration
public void UpdateSession(Session session, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| Session | session | Session |
| TableUpdate[] | updates | Update attributes |
UpdateSessionDetail(SessionDetail, TableUpdate[])
Update the data of a session detail from session details table in application database. 在應用程式數據庫中的場節詳述表格更新單一場節詳述的數據。
UpdateSessionDetail(GetSessionDetail(), new TableUpdate(SessionDetailKey.TaskID, 1))
Declaration
public void UpdateSessionDetail(SessionDetail sessionDetail, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| SessionDetail | sessionDetail | Session detail |
| TableUpdate[] | updates | Update attributes |
UpdateSessionDetails(List<SessionDetail>, TableUpdate[])
Update the data of session details from session details table in application database. 在應用程式數據庫中的場節詳述表格更新場節詳述的數據。
UpdateSessionDetails(GetSessionDetails(), new TableUpdate(SessionDetailKey.TaskID, 1))
Declaration
public void UpdateSessionDetails(List<SessionDetail> sessionsDetails, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<SessionDetail> | sessionsDetails | Session detail list |
| TableUpdate[] | updates | Update attributes |
UpdateSessions(List<Session>, TableUpdate[])
Update the data of sessions from session table in application database. 在應用程式數據庫中的場節表格更新場節的數據。
UpdateSessions(GetSessions(), new TableUpdate(SessionKey.Start, "31/05/2020 07:02:44"))
Declaration
public void UpdateSessions(List<Session> sessions, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Session> | sessions | Session list |
| TableUpdate[] | updates | Update attributes |
UpdateTask(Task, TableUpdate[])
Update the data of a task from task table in application database. 在應用程式數據庫中的任務表格更新單一任務的數據。
UpdateTask(GetTask(), new TableUpdate(TaskKey.Name, "ABC"))
Declaration
public void UpdateTask(Task task, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| Task | task | Task |
| TableUpdate[] | updates | Update attributes |
UpdateTasks(List<Task>, TableUpdate[])
Update the data of tasks from task table in application database. 在應用程式數據庫中的任務表格更新任務的數據。
UpdateTasks(GetTasks(), new TableUpdate(TaskKey.Name, "ABC"))
Declaration
public void UpdateTasks(List<Task> tasks, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<Task> | tasks | Task list |
| TableUpdate[] | updates | Update attributes |
UpdateUser(User, TableUpdate[])
Update the data of an user from user table in system database. 在系統數據庫中的使用者表格更新單一使用者的數據。
UpdateUser(GetUser(), new TableUpdate(UserKey.FullName, "ABC"))
Declaration
public void UpdateUser(User user, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| User | user | User |
| TableUpdate[] | updates | Update attributes |
UpdateUsers(List<User>, TableUpdate[])
Update the data of users from user table in system database. 在系統數據庫中的使用者表格更新使用者的數據。
UpdateUsers(GetUsers(), new TableUpdate(UserKey.FullName, "ABC"))
Declaration
public void UpdateUsers(List<User> users, params TableUpdate[] updates)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<User> | users | User list |
| TableUpdate[] | updates | Update attributes |