本文整理汇总了C#中System.Item.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Item.ToString方法的具体用法?C# Item.ToString怎么用?C# Item.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Item
的用法示例。
在下文中一共展示了Item.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintAction
void PrintAction(Item item)
{
System.Console.WriteLine("Performing action on " + item.ToString());
}
示例2: RunItem
// ----------------------------------------------------------------------------
// Processes the given Item.
// ----------------------------------------------------------------------------
private StarTeam.Item RunItem(Server stServer, Project stProject, StarTeam.View stView, Item.Type stType, Folder stFolder, Item stItem)
{
StarTeam.Item item = null;
File temp = (File)stItem;
if (temp.Name == "revision.txt")
item = stItem;
if (stItem.ToString() == "revision.txt")
item = stItem;
return item;
}
示例3: refreshData
public static void refreshData()
{
items.Clear();
int index = 0;
try
{
SqlCommand cmd = new SqlCommand("SELECT * FROM dbo.IV00101 ORDER BY ITEMNMBR", connection);
SqlDataReader reader = null;
reader = cmd.ExecuteReader();
while (reader.Read())
{
Item i = new Item();
i.itemcode = reader["ITEMNMBR"].ToString().Trim();
i.itemname = reader["ITEMDESC"].ToString().Trim();
i.pricegroup = reader["PriceGroup"].ToString().Trim();
string temp = reader["STNDCOST"].ToString();
i.cost = Convert.ToDouble(temp);
items.Add(i);
table.Add(i.ToString(), index);
index++;
}
reader.Close();
}
catch (Exception e)
{
Console.WriteLine("Oops! " + e.ToString());
}
try
{
SqlCommand cmd2 = new SqlCommand("SELECT * FROM dbo.IV00108 WHERE PRCLEVEL = 'RETAIL' ORDER BY ITEMNMBR", connection);
SqlDataReader reader2 = null;
reader2 = cmd2.ExecuteReader();
while (reader2.Read())
{
Price p = new Price();
String tempItemNumber = "";
tempItemNumber = reader2["ITEMNMBR"].ToString().Trim();
p.uofm = reader2["UOFM"].ToString().Trim();
p.Toqty = Convert.ToDouble(reader2["TOQTY"].ToString().Trim());
p.Fromqty = Convert.ToDouble(reader2["FROMQTY"].ToString().Trim());
p.Uomprice = Convert.ToDouble(reader2["UOMPRICE"].ToString().Trim());
p.Qtybsoum = Convert.ToDouble(reader2["QTYBSUOM"].ToString().Trim());
Item found = items.Find(delegate(Item it) { return it.itemcode.Equals(tempItemNumber); });
found.priceList.prices.Add(p);
}
reader2.Close();
}
catch (Exception e)
{
Console.WriteLine("Oops! " + e.ToString());
}
}
示例4: FindItem
private StarTeam.Item FindItem(Server stServer, Project stProject, StarTeam.View stView, Item.Type stType, Folder stFolder, Item stItem, String fileName)
{
StarTeam.Item item = null;
File temp = (File)stItem;
if (temp.Name == fileName)
item = stItem;
if (stItem.ToString() == fileName)
item = stItem;
return item;
}