Пример #1
0
 private void cmdSearch_Execute(object obj)
 {
     try
     {
         if (fromInvoiceNo > toInvoiceNo)
         {
             UIHelper.ShowErrorMessage("From Invoice No. cannot not be greater than To Invoice No.");
             return;
         }
         if (fromInvoiceDate > toInvoiceDate)
         {
             UIHelper.ShowErrorMessage("From Date cannot not be greater than To Date");
             return;
         }
         lstInvoiceDetails = pxyInvoice.GetInvoiceDetails(fromInvoiceNo, toInvoiceNo, fromInvoiceDate, toInvoiceDate, orderID);
     }
     catch (FaultException ex)
     {
         UIHelper.ShowErrorMessage(ex.Message);
     }
     catch (Exception ex)
     {
         UIHelper.ShowErrorMessage(ex.Message);
     }
 }
Пример #2
0
 private void cmdSearch_Execute(object obj)
 {
     try
     {
         if (fromInvoiceNo > toInvoiceNo)
         {
             UIHelper.ShowErrorMessage("From Invoice No. cannot not be greater than To Invoice No.");
             return;
         }
         if (fromInvoiceDate > toInvoiceDate)
         {
             UIHelper.ShowErrorMessage("From Date cannot not be greater than To Date");
             return;
         }
         lstInvoiceDetails = pxyInvoice.GetInvoiceDetails(fromInvoiceNo, toInvoiceNo, fromInvoiceDate, toInvoiceDate, orderID);
         if (lstProductDetails != null)
         {
             lstProductDetails.Clear();
         }
         objCustomerDetails = new Customer();
         if (lstSettlementDetails != null)
         {
             lstSettlementDetails.Clear();
         }
         if (lstInvoiceDetails == null || lstInvoiceDetails.Count == 0)
         {
             UIHelper.ShowMessage("Invoice details not found");
         }
     }
     catch (FaultException ex)
     {
         UIHelper.ShowErrorMessage(ex.Message);
     }
     catch (Exception ex)
     {
         UIHelper.ShowErrorMessage(ex.Message);
     }
 }