public object InsertUpdateSaleInvoice(SaleInvoice saleInvoice) { if (saleInvoice.SaleInvoiceDetailList.Count > 0) { saleInvoice.DetailXML = _commonBusiness.GetXMLfromSaleInvoiceObject(saleInvoice.SaleInvoiceDetailList, "ProductID,ProductModelID,UnitCode,Qty,Rate"); } if (saleInvoice.SaleInvoiceOtherChargeDetailList.Count > 0) { saleInvoice.OtherChargeDetailXML = _commonBusiness.GetXMLfromSaleInvoiceOtherChargeObject(saleInvoice.SaleInvoiceOtherChargeDetailList, "OtherChargeCode,ChargeAmount"); } return(_saleInvoiceRepository.InsertUpdateSaleInvoice(saleInvoice)); }