Beispiel #1
0
        private async void ValidateDeliveryButton_Click(object sender, EventArgs e)
        {
            var validateDeliveryRequest = new ValidateDeliveryRequest
            {
                ValidationType = "Destination",
                CampaignId     = SelectedCampaign.Id,
                DeliveryCode   = DashboardPanel_DeliveryCodeTextBox.Text
            };

            var result = await client.ValidateDelivery(validateDeliveryRequest);

            string message;

            if (result.IsValid)
            {
                message = "Delivery Validated!";
                DashboardPanel_TreeView.Focus();
            }
            else
            {
                message = "Wrong Delivery Code.";
            }
            MessageBox.Show(message);
        }
Beispiel #2
0
        private async void ContributionPanel_ValidatePickupButton_Click(object sender, EventArgs e)
        {
            var validateDeliveryRequest = new ValidateDeliveryRequest
            {
                ValidationType = "Pickup",
                ContributionId = contributionIdTag,
                DeliveryCode   = ContributionPanel_DeliveryCodeTextBox.Text
            };

            var result = await client.ValidateDelivery(validateDeliveryRequest);

            string message;

            if (result.IsValid)
            {
                message = "Delivery Validated!";
                ContributionPanel.Focus();
            }
            else
            {
                message = "Wrong Delivery Code.";
            }
            MessageBox.Show(message);
        }