本文整理汇总了C#中Query.AddJoinQuery方法的典型用法代码示例。如果您正苦于以下问题:C# Query.AddJoinQuery方法的具体用法?C# Query.AddJoinQuery怎么用?C# Query.AddJoinQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Query
的用法示例。
在下文中一共展示了Query.AddJoinQuery方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetSwitchState
public bool GetSwitchState(string nick,string switchtype)
{
if (nick == null)
{
return false;
}
Query qUS = new Query(typeof(tb_User_SwitchEntity));
qUS.AddAttribute(tb_User_SwitchEntity.__STATE);
Query qS = new Query(typeof(tb_AutoSwitchEntity));
Condition cS = qS.GetQueryCondition();
cS.AddEqualTo(tb_AutoSwitchEntity.__SWITCH, switchtype);
Query qU = new Query(typeof(tb_UserEntity));
Condition cU = qU.GetQueryCondition();
cU.AddEqualTo(tb_UserEntity.__NICK, nick);
qUS.AddJoinQuery(tb_User_SwitchEntity.__SWITCH_ID, qS, tb_AutoSwitchEntity.__ID);
qUS.AddJoinQuery(tb_User_SwitchEntity.__USER_ID, qU, tb_UserEntity.__ID);
object state = qUS.ExecuteScalar();
if (state == null)
{
return false;
}
return (bool)state;
}
示例2: GetTraderContext
public string GetTraderContext(string nick)
{
if (nick == "")
{
return "";
}
Query qU=new Query(typeof(tb_UserEntity));
Condition c=qU.GetQueryCondition();
c.AddEqualTo(tb_UserEntity.__NICK,nick);
Query qT=new Query(typeof(tb_TraderateContextEntity));
qT.AddAttribute(tb_TraderateContextEntity.__CONTEXT);
qT.AddJoinQuery(tb_TraderateContextEntity.__USER_ID,qU,tb_UserEntity.__ID);
object o = qT.ExecuteScalar();
if (o != null)
{
return o.ToString();
}
else
{
return "";
}
}
示例3: GetSwitchPropertyState
public bool GetSwitchPropertyState(string nick, string switchpro)
{
Query qUS = new Query(typeof(tb_User_SwitchPropertyEntity));
qUS.AddAttribute(tb_User_SwitchPropertyEntity.__STATE);
Query qS = new Query(typeof(tb_SwitchPropertyEntity));
Condition cS = qS.GetQueryCondition();
cS.AddEqualTo(tb_SwitchPropertyEntity.__PRONAME, switchpro);
Query qU = new Query(typeof(tb_UserEntity));
Condition cU = qU.GetQueryCondition();
cU.AddEqualTo(tb_UserEntity.__NICK, nick);
qUS.AddJoinQuery(tb_User_SwitchPropertyEntity.__SWITCHPROERTY_ID, qS, tb_SwitchPropertyEntity.__ID);
qUS.AddJoinQuery(tb_User_SwitchPropertyEntity.__USER_ID,qU,tb_UserEntity.__ID);
object state = qUS.ExecuteScalar();
if (state == null)
{
return false;
}
return (bool)state;
}
示例4: GetContextTotalByUser
public int GetContextTotalByUser(string nick)
{
Query qU = new Query(typeof(tb_UserEntity));
Condition cU = qU.GetQueryCondition();
cU.AddEqualTo(tb_UserEntity.__NICK, nick);
Query qT = new Query(typeof(tb_TraderateContextEntity));
qT.SelectCount(tb_TraderateContextEntity.__ID,"total");
qT.AddJoinQuery(tb_TraderateContextEntity.__USER_ID, qU, tb_UserEntity.__ID);
object o=qT.ExecuteScalar();
return (int)o;
}
示例5: GetContext
public DataTable GetContext(string nick)
{
DataTable dt = new DataTable();
if (nick == "")
{
return dt;
}
Query qU = new Query(typeof(tb_UserEntity));
Condition cU = qU.GetQueryCondition();
cU.AddEqualTo(tb_UserEntity.__NICK,nick);
Query qT = new Query(typeof(tb_TraderateContextEntity));
qT.AddAttribute(AttributeType.All);
qT.AddJoinQuery(tb_TraderateContextEntity.__USER_ID, qU, tb_UserEntity.__ID);
dt=qT.Execute();
return dt;
}