本文整理汇总了C#中Request.SetId方法的典型用法代码示例。如果您正苦于以下问题:C# Request.SetId方法的具体用法?C# Request.SetId怎么用?C# Request.SetId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Request
的用法示例。
在下文中一共展示了Request.SetId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1:
void IRequestDatabaseAdapter.AddToDatabase(ref Request newRequest)
{
//dodanie do bazy Requesta i ustawia ID obiektu na to co przypisała baza
newRequest.SetId(ordersData.Add.Order(newRequest.Mark, newRequest.Model, newRequest.Owner, newRequest.Description));
}
示例2: ConvertToTable
/// <summary>
/// Metoda zwraca zlecenie o podanym ID
/// </summary>
/// <param name="ID"></param>
/// <returns></returns>
Request IRequestDatabaseAdapter.GetById(int id)
{
databaseData = ordersData.Get.ById(id);
convertedData = ConvertToTable(databaseData);
reqBuff.ID = int.Parse(convertedData[0, 0]);
reqBuff.Mark = convertedData[0, 1];
reqBuff.Model = convertedData[0, 2];
reqBuff.Owner = convertedData[0, 3];
reqBuff.Description = convertedData[0, 4];
if (convertedData[0, 5] == "True")
{
reqBuff.Archiwized = true;
}
else
{
reqBuff.Archiwized = false;
}
reqBuff.ListOfParts = PreparePartList(reqBuff.ID);
IRequestWithIdAcces result = new Request(reqBuff.Model, reqBuff.Owner, reqBuff.Mark, reqBuff.Description, reqBuff.ListOfParts, reqBuff.Archiwized);
result.SetId(reqBuff.ID);
return (Request) result;
}
示例3: PrepareReqList
// Funkcja pomocnicza ktora tworzy liste obiektow Request
private List<Request> PrepareReqList()
{
List<Request> result = new List<Request>();
convertedData = ConvertToTable(databaseData);
for (int i = 0; i < databaseData[0].Count(); i++)
{
reqBuff.ID = int.Parse(convertedData[i, 0]);
reqBuff.Mark = convertedData[i, 1];
reqBuff.Model = convertedData[i, 2];
reqBuff.Owner = convertedData[i, 3];
reqBuff.Description = convertedData[i, 4];
if (convertedData[i, 5] == "True")
{
reqBuff.Archiwized = true;
}
else
{
reqBuff.Archiwized = false;
}
reqBuff.ListOfParts = PreparePartList(reqBuff.ID);
IRequestWithIdAcces newRequest = new Request(reqBuff.Model, reqBuff.Owner, reqBuff.Mark, reqBuff.Description, reqBuff.ListOfParts, reqBuff.Archiwized);
newRequest.SetId(reqBuff.ID);
result.Add((Request)newRequest);
}
return result;
}