Ejemplo n.º 1
0
 public object searchInvoice(SearchInvoiceRequest objRequest)
 {
     try
     {
         if (ModelState.IsValid)
         {
             return(invoice.searchInvoice(objRequest));
         }
         else
         {
             searchInvoiceResponse returnObj = new searchInvoiceResponse();
             returnObj.error = UtilitesModel.getErrorList(ModelState);
             return(returnObj);
         }
     }
     catch (Exception ex)
     {
         throw Logs.ErrorException(ex, HttpStatusCode.BadRequest, ex.Message + " - " + ex.StackTrace);
     }
 }
Ejemplo n.º 2
0
 public createInvoiceResponse createInvoiceNooriginalKey(CreateInvoiceRequest objRequest)
 {
     try
     {
         if (ModelState.IsValid)
         {
             return(invoice.createInvoice(objRequest));
         }
         else
         {
             createInvoiceResponse returnObj = new createInvoiceResponse();
             returnObj.key     = objRequest.key;
             returnObj.taxCode = objRequest.invoice.ComTaxCode;
             returnObj.result  = false;
             returnObj.error   = UtilitesModel.getErrorList(ModelState);
             return(returnObj);
         }
     }
     catch (Exception ex)
     {
         throw Logs.ErrorException(ex, HttpStatusCode.BadRequest, ex.Message + " - " + ex.StackTrace);
     }
 }