Example #1
0
        async private void DoGenerateZip(object obj)
        {
            try
            {
                WorkInProgress = true;
                if (DeliveryBatch != null)
                {
                    DeliveryInProgress = Visibility.Visible;
                    var result = await RestHub.GenerateZIP(DeliveryBatch.Id, MaxZipSize * 1000 * 1000);

                    if (result.HttpCode == System.Net.HttpStatusCode.OK)
                    {
                        ZipResultDTO zipResult = (ZipResultDTO)result.UserObject;
                        ZipResult.ShowResult(zipResult);
                    }
                    else
                    {
                        AppErrorBox.ShowErrorMessage("Error While Generating ZIP . .", result.HttpResponse);
                    }
                    DeliveryInProgress = Visibility.Hidden;
                }
                else
                {
                    MessageBox.Show("From Batch, From Category, Delivery Batch Number Is Required . . .");
                }
                WorkInProgress = false;
            }
            catch (Exception ex)
            {
                Log.This(ex);
            }
        }