示例#1
0
        public IProgressItem StartExport()
        {
            if (!_crmSecurity.IsAdmin)
            {
                throw _crmSecurity.CreateSecurityException();
            }

            _messageService.Send(MessageAction.CrmAllDataExported);

            return(_exportToCsv.Start(null, CRMSettingResource.Export + ".zip"));
        }
        public IProgressItem StartExport()
        {
            if (!CRMSecurity.IsAdmin)
            {
                throw CRMSecurity.CreateSecurityException();
            }

            MessageService.Send(Request, MessageAction.CrmAllDataExported);

            return(ExportToCsv.Start(null, string.Format("{0}_{1}.zip", CRMSettingResource.Export, DateTime.UtcNow.Ticks)));
        }
示例#3
0
        public IProgressItem StartExport()
        {
            if (!CRMSecurity.IsAdmin)
            {
                throw CRMSecurity.CreateSecurityException();
            }

            MessageService.Send(Request, MessageAction.CrmAllDataExported);

            return(ExportToCsv.Start(null, "exportdata.zip"));
        }
示例#4
0
        public IProgressItem StartPartialExport(string entityType, string base64FilterString)
        {
            if (string.IsNullOrEmpty(base64FilterString))
            {
                throw new ArgumentException();
            }

            FilterObject filterObject;
            String       fileName;

            switch (entityType.ToLower())
            {
            case "contact":
                filterObject = new ContactFilterObject(base64FilterString);
                fileName     = CRMContactResource.Contacts + ".csv";
                MessageService.Send(Request, MessageAction.ContactsExportedToCsv);
                break;

            case "opportunity":
                filterObject = new DealFilterObject(base64FilterString);
                fileName     = CRMCommonResource.DealModuleName + ".csv";
                MessageService.Send(Request, MessageAction.OpportunitiesExportedToCsv);
                break;

            case "case":
                filterObject = new CasesFilterObject(base64FilterString);
                fileName     = CRMCommonResource.CasesModuleName + ".csv";
                MessageService.Send(Request, MessageAction.CasesExportedToCsv);
                break;

            case "task":
                filterObject = new TaskFilterObject(base64FilterString);
                fileName     = CRMCommonResource.TaskModuleName + ".csv";
                MessageService.Send(Request, MessageAction.CrmTasksExportedToCsv);
                break;

            case "invoiceitem":
                fileName     = CRMCommonResource.ProductsAndServices + ".csv";
                filterObject = new InvoiceItemFilterObject(base64FilterString);
                break;

            default:
                throw new ArgumentException();
            }

            return(ExportToCsv.Start(filterObject, fileName));
        }