예제 #1
0
        public static Task <(bool success, string message, bool hasFile, object tag)> ExportFileAsync(UnanetClient una, string sourceFolder, string type = "CUSTOMER")
        {
            AddressModel.ExportFileAsync(una, sourceFolder);
            EmailModel.ExportFileAsync(una, sourceFolder);
            PhoneModel.ExportFileAsync(una, sourceFolder);
            var filePath = Path.Combine(sourceFolder, una.Options.organization_contact.file);

            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }
            return(Task.Run(() => una.GetEntitiesByExportAsync(una.Options.organization_contact.key, (z, f) =>
            {
                f.Checked["suppressOutput"] = true;
                f.FromSelect("organizationtype", type);
                return null;
            }, sourceFolder)));
        }