Esempio n. 1
0
        private Campaign ReadRowCustomers(Row row, SheetMap sheetMap)
        {
            // Ignore alreay imported
            string IONumber = sheetMap.GetCellByColumnName(row, "IO#").DisplayValue;

            if (!string.IsNullOrEmpty(IONumber))
            {
                return(null);
            }

            var campaign = new Campaign();

            campaign.Price               = row.Id.Value; // Just re-using Price feild, in fact it should be rowId long
            campaign.Id                  = Guid.NewGuid();
            campaign.CreatedAt           = DateTime.Now;
            campaign.CreatedBy           = "Smartsheet";
            campaign.Status              = (int)CampaignStatus.OrderRecevied;
            campaign.WhiteLabel          = sheetMap.GetCellByColumnName(row, "White Label").DisplayValue;
            campaign.CampaignName        = sheetMap.GetCellByColumnName(row, "Campaign Name").DisplayValue;
            campaign.BroadcastDate       = sheetMap.GetCellByColumnName(row, "Broadcast Date").Value.ToSafeDateTime();
            campaign.RepresentativeName  = sheetMap.GetCellByColumnName(row, "Production Rep").DisplayValue;
            campaign.RepresentativeEmail = sheetMap.GetCellByColumnName(row, "Production Rep").DisplayValue;

            campaign.Quantity            = sheetMap.GetCellByColumnName(row, "QTY").DisplayValue.ToSafeInt();
            campaign.GeoDetails          = sheetMap.GetCellByColumnName(row, "GEO").DisplayValue;
            campaign.Demographics        = sheetMap.GetCellByColumnName(row, "Demo").DisplayValue;
            campaign.FromLine            = sheetMap.GetCellByColumnName(row, "From Line").DisplayValue;
            campaign.SubjectLine         = sheetMap.GetCellByColumnName(row, "Subject Line").DisplayValue;
            campaign.SpecialInstructions = sheetMap.GetCellByColumnName(row, "Special Instructions").DisplayValue;
            campaign.IsPersonalization   = sheetMap.GetCellByColumnName(row, "Personalization").Value.ToSafeBoolean();
            campaign.IsSuppression       = sheetMap.GetCellByColumnName(row, "Suppression").Value.ToSafeBoolean();
            campaign.Assets = new CampaignAsset();

            campaign.Assets.Id         = Guid.NewGuid();
            campaign.Assets.CampaignId = campaign.Id;
            campaign.Assets.CreatedAt  = DateTime.Now;
            campaign.Assets.CreatedBy  = "Smartsheet";

            return(campaign);
        }
Esempio n. 2
0
        private Campaign ReadRowStrategus(Row row, SheetMap sheetMap)
        {
            // Ignore alreay imported
            string IONumber = sheetMap.GetCellByColumnName(row, "NXS IO Number").DisplayValue;

            if (!string.IsNullOrEmpty(IONumber))
            {
                return(null);
            }

            var campaign = new Campaign();

            campaign.Price               = row.Id.Value; // Just re-using Price feild, in fact it should be rowId long
            campaign.Id                  = Guid.NewGuid();
            campaign.CreatedAt           = DateTime.Now;
            campaign.CreatedBy           = "Smartsheet";
            campaign.Status              = (int)CampaignStatus.OrderRecevied;
            campaign.WhiteLabel          = StringConstants.CustomerStrategus;
            campaign.CampaignName        = sheetMap.GetCellByColumnName(row, "Campaign Name").DisplayValue;
            campaign.Quantity            = sheetMap.GetCellByColumnName(row, "Email Blast QTY").DisplayValue.ToSafeInt();
            campaign.BroadcastDate       = sheetMap.GetCellByColumnName(row, "Broadcast Date").Value.ToSafeDateTime();
            campaign.GeoDetails          = sheetMap.GetCellByColumnName(row, "Geography").DisplayValue;
            campaign.Demographics        = sheetMap.GetCellByColumnName(row, "Demographics").DisplayValue;
            campaign.FromLine            = sheetMap.GetCellByColumnName(row, "From Line").Value.ToSafeString();
            campaign.SubjectLine         = sheetMap.GetCellByColumnName(row, "Subject Line").DisplayValue;
            campaign.SpecialInstructions = sheetMap.GetCellByColumnName(row, "Special Instructions").DisplayValue;
            campaign.ReBroadcastedURL    = sheetMap.GetCellByColumnName(row, "RTG URL").DisplayValue;
            campaign.RepresentativeName  = sheetMap.GetCellByColumnName(row, "Modified By").DisplayValue;
            campaign.RepresentativeEmail = sheetMap.GetCellByColumnName(row, "Modified By").DisplayValue;
            campaign.Assets              = new CampaignAsset();

            campaign.Assets.Id         = Guid.NewGuid();
            campaign.Assets.CampaignId = campaign.Id;
            campaign.Assets.CreatedAt  = DateTime.Now;
            campaign.Assets.CreatedBy  = "Smartsheet";

            return(campaign);
        }
Esempio n. 3
0
        private Campaign ReadRowAdvantage(Row row, SheetMap sheetMap)
        {
            // Ignore alreay imported
            string IONumber = sheetMap.GetCellByColumnName(row, "ID#Verum").DisplayValue;

            if (!string.IsNullOrEmpty(IONumber))
            {
                return(null);
            }

            var campaign = new Campaign();

            campaign.Price               = row.Id.Value; // Just re-using Price feild, in fact it should be rowId long
            campaign.Id                  = Guid.NewGuid();
            campaign.CreatedAt           = DateTime.Now;
            campaign.CreatedBy           = "Smartsheet";
            campaign.Status              = (int)CampaignStatus.OrderRecevied;
            campaign.WhiteLabel          = StringConstants.CustomerAdvantage;
            campaign.CampaignName        = sheetMap.GetCellByColumnName(row, "Campaign Name").DisplayValue;
            campaign.BroadcastDate       = sheetMap.GetCellByColumnName(row, "Broadcast Date").Value.ToSafeDateTime();
            campaign.RepresentativeName  = sheetMap.GetCellByColumnName(row, "Account Manager").DisplayValue;
            campaign.RepresentativeEmail = sheetMap.GetCellByColumnName(row, "Account Manager").DisplayValue;
            campaign.Quantity            = sheetMap.GetCellByColumnName(row, "Broadcast Quantity").DisplayValue.ToSafeInt();
            campaign.GeoDetails          = sheetMap.GetCellByColumnName(row, "ZIP/Geo").DisplayValue;
            campaign.FromLine            = sheetMap.GetCellByColumnName(row, "From Line").Value.ToSafeString();
            campaign.SubjectLine         = sheetMap.GetCellByColumnName(row, "Subject Line").DisplayValue;
            campaign.SpecialInstructions = sheetMap.GetCellByColumnName(row, "Schedule / Special Instructions").DisplayValue;
            campaign.Assets              = new CampaignAsset();

            campaign.Assets.Id         = Guid.NewGuid();
            campaign.Assets.CampaignId = campaign.Id;
            campaign.Assets.CreatedAt  = DateTime.Now;
            campaign.Assets.CreatedBy  = "Smartsheet";

            return(campaign);
        }