private void DeleteInvoice(int orderid) { var orderData = new OrderData(PortalId, orderid); GenXmlFunctions.DeleteFile(orderData.InvoiceFileName, StoreSettings.Current.FolderUploadsMapPath, ""); orderData.InvoiceDownloadName = ""; orderData.InvoiceFileExt = ""; orderData.InvoiceFileName = ""; orderData.InvoiceFilePath = ""; orderData.SavePurchaseData(); }
public void DeleteLinkedFiles(int itemId, string uploadFolder, string folderMapPath = "") { var obj = ObjCtrl.Get(itemId); if ((uploadFolder != "" | folderMapPath != "") & obj != null) { var fldr = PortalSettings.HomeDirectoryMapPath + uploadFolder; if (folderMapPath != "") { fldr = folderMapPath; } obj.XMLData = GenXmlFunctions.DeleteFile(obj.XMLData, fldr); ObjCtrl.Update(obj); } }