/// <summary>
        /// Applies mappings to record
        /// </summary>
        /// <param name="spotImport"></param>
        private void ApplyMappings(SpotImport spotImport)
        {
            // Update Campaign No
            ConversionMapping <Int32> campaignMapping = _conversionMappings.Campaigns.Find(x => x.OldValue == spotImport.camp_no);

            if (campaignMapping != null)
            {
                spotImport.camp_no = campaignMapping.NewValue;
            }

            // Updates SalesArea
            ConversionMapping <Int32> salesAreaMapping = _conversionMappings.SalesAreas.Find(x => x.OldValue == spotImport.sare_no);

            if (campaignMapping != null)
            {
                spotImport.sare_no = salesAreaMapping.NewValue;
            }

            // Update SpotExternalRef
            ConversionMapping <Int64> slotExternalRefMapping = _conversionMappings.SpotExternalRefs.Find(x => x.OldValue == spotImport.spot_no);

            if (slotExternalRefMapping != null)
            {
                spotImport.spot_no = slotExternalRefMapping.NewValue;
            }
        }
Beispiel #2
0
 private string GetAction(SpotImport spotImport)
 {
     if (!String.IsNullOrEmpty(spotImport.status) && spotImport.status.ToUpper() == "C")
     {
         return("C");
     }
     return("B");
 }
Beispiel #3
0
        private DateTime GetStartDateTime(SpotImport spotImport)
        {
            string nom_time = spotImport.brek_nom_time.ToString("000000");
            int    seconds  = (Convert.ToInt32(nom_time.Substring(0, 2)) * (60 * 60)) + // Hours
                              (Convert.ToInt32(nom_time.Substring(2, 2)) * 60) +        // Mins
                              (Convert.ToInt32(nom_time.Substring(4, 2)));              // Secs

            return(DateHelper.GetDateTime(string.Format("{0} {1}", spotImport.brek_sched_date.ToString("00000000"), "000000"), "yyyyMMdd HHmmss", DateTimeKind.Utc).AddSeconds(seconds));
        }
Beispiel #4
0
        private string GetProcessor(SpotImport spotImport)
        {
            if (!String.IsNullOrEmpty(spotImport.status) && spotImport.status.ToUpper() == "C")
            {
                switch (spotImport.pass_no)
                {
                case -2: return(RsProcessor);

                case -1: return(IsrProcessor);
                }
            }
            return(AutoProcessor);
        }