本文整理汇总了C#中DataSet.Read方法的典型用法代码示例。如果您正苦于以下问题:C# DataSet.Read方法的具体用法?C# DataSet.Read怎么用?C# DataSet.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataSet
的用法示例。
在下文中一共展示了DataSet.Read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UILoadDataSet
private void UILoadDataSet(DataSet clientsData)
{
this.Clients.Children.Clear();
if (clientsData.NumberOfRows() != 0)
{
bool doneBuilders = false;
while (clientsData.Read())
{
Client client = new Client(clientsData.GetRecordDataSet());
TextBlock block = new TextBlock();
block.Text = client.GetName();
block.Name = "Client" + client.GetClientID();
clientsTable.Add(block.Name, client);
Color forground = new Color();
forground.ScA = 1;
forground.ScR = 1;
forground.ScG = 1;
forground.ScB = 1;
block.Foreground = new SolidColorBrush(forground);
block.FontSize = 14;
block.MouseEnter += TextBlock_MouseEnter;
block.MouseLeave += TextBlock_MouseLeave;
block.MouseDown += TextBlock_DoubleClick;
if (!doneBuilders & client.GetClientType() == 1)
{
Thickness padding = new Thickness();
padding.Top = 15;
block.Padding = padding;
doneBuilders = true;
}
this.Clients.Children.Add(block);
}
}
else
{
MessageBox.Show("There are currently no clients in the System. Please create a client.", "No Clients Exist!", MessageBoxButton.OK, MessageBoxImage.Error);
MainWindow.RemoveTab(this.Name);
}
}