Пример #1
0
        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();
        }
Пример #2
0
        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);
            }
        }