当前位置: 首页>>代码示例>>C#>>正文


C# XmlRpcStruct.Select方法代码示例

本文整理汇总了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();

        }
开发者ID:sgh1986915,项目名称:vfos-scraper-c-,代码行数:60,代码来源:OrderProcessClient.cs


注:本文中的CookComputing.XmlRpc.XmlRpcStruct.Select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。