private void Button_Click(object sender, RoutedEventArgs e) { Service1Client sf = new Service1Client(); //sf.GetAllTools(); List<ToolDTO> list = new List<ToolDTO>(); ToolList.Text += sf.GetAllTools(); }
public void GetData() { Service1Client service = new Service1Client(); List<ToolDTO> tools = new List<ToolDTO>(); tools = service.GetAllTools().OrderBy(d => d.ServiceDate).ToList(); ToolList.DataSource = tools; ToolList.DataBind(); }
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); } }