public AddProductWindow(MESServiceClient client, int departmentId)
 {
     InitializeComponent();
     this.client                        = client;
     this.departmentId                  = departmentId;
     ProductsComboBox.ItemsSource       = client.GetProducts();
     ProductsComboBox.DisplayMemberPath = "Name";
     ProductsComboBox.SelectedValuePath = "Id";
     ProductsComboBox.SelectedIndex     = 0;
 }
 public TakeProductWindow(MESServiceClient client, int[] productIds)
 {
     InitializeComponent();
     this.client                     = client;
     this.productIds                 = productIds;
     TeamsComboBox.ItemsSource       = client.GetTeams();
     TeamsComboBox.DisplayMemberPath = "Name";
     TeamsComboBox.SelectedValuePath = "Id";
     TeamsComboBox.SelectedIndex     = 0;
 }
示例#3
0
        static void Main(string[] args)
        {
            MESServiceClient client = new MESServiceClient("BasicHttpBinding_IMESService");

            Console.WriteLine(client.GetData(7));
            //var departments = client.GetDepartments();

            /*foreach (var department in departments)
             * {
             *  Console.WriteLine(department.Name);
             * }*/
            //Console.WriteLine(client.InitDb());
            client.Close();
            Console.ReadKey();
        }