本文整理汇总了C#中DB.GetHostLane方法的典型用法代码示例。如果您正苦于以下问题:C# DB.GetHostLane方法的具体用法?C# DB.GetHostLane怎么用?C# DB.GetHostLane使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB
的用法示例。
在下文中一共展示了DB.GetHostLane方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetViewTableData
public GetViewTableDataResponse GetViewTableData (WebServiceLogin login, int? lane_id, string lane, int? host_id, string host, int page, int page_size)
{
GetViewTableDataResponse response = new GetViewTableDataResponse ();
using (DB db = new DB ()) {
Authenticate (db, login, response);
response.Lane = FindLane (db, lane_id, lane);
response.Host = FindHost (db, host_id, host);
response.Count = DBRevisionWork_Extensions.GetCount (db, response.Lane.id, response.Host.id);
response.Page = page;
response.PageSize = page_size;
response.RevisionWorkViews = DBRevisionWorkView_Extensions.Query (db, response.Lane, response.Host, response.PageSize, response.Page);
var hl = db.GetHostLane (response.Host.id, response.Lane.id);
if (hl != null)
response.Enabled = hl.enabled;
}
return response;
}
示例2: SwitchHostHiddenForLane
public void SwitchHostHiddenForLane (WebServiceLogin login, int lane_id, int host_id)
{
using (DB db = new DB ()) {
VerifyUserInRole (db, login, Roles.Administrator);
DBHostLane hostlane = db.GetHostLane (host_id, lane_id);
hostlane.hidden = !hostlane.hidden;
hostlane.Save (db);
}
}
示例3: SwitchHostHiddenForLane
public void SwitchHostHiddenForLane (WebServiceLogin login, int lane_id, int host_id)
{
using (DB db = new DB ()) {
var lane = DBLane_Extensions.Create (db, lane_id);
VerifyUserInRoles (db, login, lane.additional_roles, false);
DBHostLane hostlane = db.GetHostLane (host_id, lane.id);
hostlane.hidden = !hostlane.hidden;
hostlane.Save (db);
}
}