本文整理汇总了C#中CookComputing.XmlRpc.XmlRpcStruct.Select方法的典型用法代码示例。如果您正苦于以下问题:C# XmlRpcStruct.Select方法的具体用法?C# XmlRpcStruct.Select怎么用?C# XmlRpcStruct.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CookComputing.XmlRpc.XmlRpcStruct
的用法示例。
在下文中一共展示了XmlRpcStruct.Select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrepareGridDisplay
/// <summary>
/// Prepare Grid for Display with customizing columns, adding button columns and etc
/// </summary>
/// <param name="orderslist">array of orders representing in XmlRpcStruct</param>
private void PrepareGridDisplay(XmlRpcStruct[] orderslist)
{
gvOrdersList.Columns.Clear();
var ol = orderslist.Select(order => new
{
OrderId = order["order_id"],
Customer = order["customer"],
Status = order["status"],
DateOrdered = order["date_added"],
Total = Utilities.TryGetCurrencySymbol(order["currency_code"].ToString()) + Convert.ToDecimal(String.Format("{0:0.00}", Convert.ToDecimal(order["total"].ToString()))).ToString(),
CurrencyCode = order["currency_code"]
}).ToList();
gvOrdersList.DataSource = ol;
DataGridViewButtonColumn updateButton = new DataGridViewButtonColumn();
updateButton.FlatStyle = FlatStyle.Flat;
updateButton.HeaderText = "Update";
updateButton.Text = "Update";
updateButton.UseColumnTextForButtonValue = true;
updateButton.Name = "Update";
gvOrdersList.Columns.Add(updateButton);
DataGridViewButtonColumn printButton = new DataGridViewButtonColumn();
printButton.FlatStyle = FlatStyle.Flat;
printButton.HeaderText = "Print";
printButton.Text = "Print";
printButton.UseColumnTextForButtonValue = true;
printButton.Name = "PrintColumn";
gvOrdersList.Columns.Add(printButton);
DataGridViewButtonColumn viewButton = new DataGridViewButtonColumn();
viewButton.FlatStyle = FlatStyle.Flat;
viewButton.HeaderText = "View";
viewButton.Text = "View";
viewButton.UseColumnTextForButtonValue = true;
viewButton.Name = "ViewColumn";
gvOrdersList.Columns.Add(viewButton);
gvOrdersList.Columns[0].HeaderText = "Order ID";
gvOrdersList.Columns[1].HeaderText = "Customer";
gvOrdersList.Columns[2].HeaderText = "Current Status";
gvOrdersList.Columns[3].HeaderText = "Ordered Date";
gvOrdersList.Columns[4].HeaderText = "Total";
gvOrdersList.Columns[5].HeaderText = "Currency Code";
gvOrdersList.Columns[2].Width = 150;
gvOrdersList.Columns[3].Width = 150;
gvOrdersList.Columns[5].Width = 120;
gvOrdersList.Columns[1].Width = 210;
gvOrdersList.Columns[4].Width = 100;
gvOrdersList.Columns[5].Visible = false;
gvOrdersList.CellClick -= new DataGridViewCellEventHandler(gvOrdersList_CellClick);
gvOrdersList.CellClick += new DataGridViewCellEventHandler(gvOrdersList_CellClick);
FormatOrdersGrid();
gvOrdersList.Select();
}