本文整理汇总了C#中Query.AddParam方法的典型用法代码示例。如果您正苦于以下问题:C# Query.AddParam方法的具体用法?C# Query.AddParam怎么用?C# Query.AddParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Query
的用法示例。
在下文中一共展示了Query.AddParam方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetModel
public OfficialMatchRank GetModel(int gmid, int userid)
{
Query query = new Query();
query.Where = string.Format("gmid={0} and UserId={1}", dal.BuildParameterName("gmid"), dal.BuildParameterName("UserId"));
query.AddParam("gmid", gmid);
query.AddParam("UserId", userid);
return dal.Get(query);
}
示例2: AddGift
public string AddGift(int giftID,int userID)
{
//if (giftID == 1 || giftID == 2 || giftID == 3||giftID ==4)
//{
Query query = new Query();
query.AddParam("UserID", userID);
query.AddParam("GiftID", giftID);
DataSet ds=Gateway.Default.ExecuteSPForDS("AddGift", query);
return ds.Tables[0].Rows[0][0].ToString();
//}
//return "有该领奖活动吗?";
}
示例3: ResultSet
public void ResultSet(int id, int deid)
{
bizGGuess gm = new bizGGuess();
bizGGuessDe gg = new bizGGuessDe();
List<GGuessDe> list = gg.ListByGGuessID(id);
GGuess modelMain = gm.Get(id);
int allNum = list.Sum(p => p.JinbiNum);
decimal peilv;
GGuessDe model = list.First(p => p.GGuessDeID == deid);
if (allNum == 0 || model.JinbiNum==0)
peilv = 1;
else
peilv = Math.Round((decimal)allNum / model.JinbiNum, 2);
Query query = new Query();
query.AddParam("GGuessID", id);
query.AddParam("GGuessDeID",deid);
query.AddParam("Peilv", peilv);
Gateway.Default.ExecuteSPForNonQuery("GGuessResultSet",query);
//List<GGuessUsers> listGUser = ListByGGuessID(deid);
//int i = 0;
//foreach (GGuessUsers item in listGUser)
//{
// i++;
// if (item.Status == 0)
// {
// Users modelUser = bu.Get(item.UserID);
// modelUser.Attach();
// modelUser.Jinbi = modelUser.Jinbi + int.Parse((decimal.Parse(item.Jinbi.ToString()) * peilv).ToString());
// modelUser.Detach();
// bu.Update(modelUser);
// item.Attach();
// item.Status = 1;
// item.Detach();
// Update(item);
// }
//}
//modelMain.Attach();
//modelMain.ResultItem = model.ItemName;
//modelMain.ResultUserNum = i;
//modelMain.Status = 2;
//modelMain.Detach();
//gm.Update(modelMain);
}
示例4: button8_Click
private void button8_Click(object sender, EventArgs e)
{
LeanCloudRepository<RegUsers> rep = new LeanCloudRepository<RegUsers>();
rep.FindAllEvent+=rep_FindAllEvent;
Query query = new Query();
query.AddParam(new QueryParam("UserName", "6", QuerySign.LIKE, ConnectSign.AND, true));
rep.FindAllByCondition(query);
}
示例5: button7_Click
private void button7_Click(object sender, EventArgs e)
{
LeanCloudRepository<RegUsers> rep = new LeanCloudRepository<RegUsers>();
rep.FindEvent+=rep_FindEvent;
Query query=new Query();
query.AddParam(new QueryParam("UserName", "haha1", QuerySign.EQ, ConnectSign.AND, true))
.AddParam(new QueryParam("Password", "222222", QuerySign.EQ, ConnectSign.AND, true));
rep.FindByCondition(query);
}
示例6: SetUserRecord
public void SetUserRecord(int gmid, int userid, string username, decimal score)
{
Query query = new Query();
query.Where = string.Format("gmid={0} and UserId={1}", dal.BuildParameterName("gmid"), dal.BuildParameterName("UserId"));
query.AddParam("gmid", gmid);
query.AddParam("UserId", userid);
OfficialMatchRank rank = dal.Get(query);
bizOfficialMatch biz = bizOfficialMatch.Instance();
FlashGame game = bizFlashGame.Instance().GetModel(biz.GetModel(gmid).fid);
bool isExist = false;
bool isUpdate = false;
if (rank != null)
{
isExist = true;
rank.Attach();
}
else
{
rank = new OfficialMatchRank();
rank.gmid = gmid;
rank.GameTime = DateTime.Now;
rank.UserId = userid;
rank.UserName = username;
}
if (game.IsAsc == 0)
{
if (rank.Score < score)
{
rank.Score = score;
rank.GameTime = DateTime.Now;
isUpdate = true;
}
}
else
{
if (rank.Score > score)
{
rank.Score = score;
rank.GameTime = DateTime.Now;
isUpdate = true;
}
}
if (isExist)
{
if (isUpdate)
{
dal.Update(rank);
}
}
else
{
dal.Add(rank);
}
}
示例7: DeleteAll
public void DeleteAll(int id)
{
Query query = new Query();
query.AddParam("guessid", id);
Gateway.Default.ExecuteSPForNonQuery("GGuessDelete", query);
}