本文整理汇总了C#中Service1Client.GetAllWorkers方法的典型用法代码示例。如果您正苦于以下问题:C# Service1Client.GetAllWorkers方法的具体用法?C# Service1Client.GetAllWorkers怎么用?C# Service1Client.GetAllWorkers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Service1Client
的用法示例。
在下文中一共展示了Service1Client.GetAllWorkers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: button1_Click
private void button1_Click(object sender, EventArgs e)
{
using (Service1Client s = new Service1Client())
{
dataGridView1.DataSource = s.GetAllWorkers();
}
}
示例2: GetWorkers
private void GetWorkers()
{
Service1Client service = new Service1Client();
List<WorkerDTO> workers = new List<WorkerDTO>();
workers = service.GetAllWorkers().OrderBy(w => w.UserName).ToList();
WorkersList.DataSource = workers;
WorkersList.DataBind();
}
示例3: FillCombosWorkersAndTools
void FillCombosWorkersAndTools()
{
var Cl = new Service1Client();
List<ToolDTO> tdto = new List<ToolDTO>();
List<WorkerDTO> w = new List<WorkerDTO>();
try
{
tdto = Cl.GetAllTools().ToList();
w = Cl.GetAllWorkers().ToList();
}
catch (Exception)
{
}
for (int i = 0; i < tdto.Count; i++)
{
this.DropDownListTools.Items.Add(tdto[i].ToolID.ToString());
}
for (int i = 0; i < w.Count; i++)
{
this.DropDownListWorkers.Items.Add(w[i].UserName);
}
}