コード例 #1
0
        //VALIDATION MANAGER
        /// <summary>
        /// Validates the specified invoice, updating its isValid and isChecked attributes appropriately.
        /// </summary>
        /// <param name="invoiceId">id of invoice to validate</param>
        /// <param name="saveAfterValidation">bool representing whether the invoice validation details are saved post-validation</param>
        /// <returns>JSON representation of validated invoice, wrapped in EMResponse.</returns>
        public string validateInvoice(int invoiceId, bool saveAfterValidation)
        {
            EMResponse response = new EMResponse();
            try
            {
                validationMgr = new ValidationManager();
                response.data = EMConverter.fromObjectToJSON(validationMgr.validateInvoice(invoiceId, saveAfterValidation));
                response.status = ok;
            }
            catch (Exception e)
            {
                response.status = error;
                response.data = e.Message;
            }

            return EMConverter.fromObjectToJSON(response);
        }
コード例 #2
0
 public Invoice validateInvoice(Invoice invoice, bool safeAfterValidation)
 {
     validationMgr = new ValidationManager();
     return(validationMgr.validateInvoice(invoice, safeAfterValidation));
 }
コード例 #3
0
 public Invoice validateInvoice(Invoice invoice, bool safeAfterValidation)
 {
     validationMgr = new ValidationManager();
     return validationMgr.validateInvoice(invoice, safeAfterValidation);
 }
コード例 #4
0
        //-->VALIDATION MANAGER



        public string validateInvoice(int invoiceId, bool saveAfterValidation)
        {
            validationMgr = new ValidationManager();
            return(validationMgr.validateInvoice(invoiceId, saveAfterValidation));
        }
コード例 #5
0
 //-->VALIDATION MANAGER
 public string validateInvoice(int invoiceId, bool saveAfterValidation)
 {
     validationMgr = new ValidationManager();
     return validationMgr.validateInvoice(invoiceId, saveAfterValidation);
 }