Beispiel #1
0
        private void ShipRequest(object sender, RoutedEventArgs e)
        {
            Error = "";

            DataRowView item      = (DataRowView)RequestsList.SelectedItem;
            int         requestId = (int)item.Row[0];

            if (_proxy.ShipRequest(requestId) == 0)
            {
                _requests = _proxy.GetOpenRequests();
                RequestsList.ItemsSource = _requests.DefaultView;
                Error = "Request successfully completed.";
            }
            else
            {
                Error = "Some error happened on shipping the request.";
            }
        }