예제 #1
0
        private void LoadRecipientsFromFile()
        {
            DataTable recipientsDT         = MyXLMain.ReadRange(this.RecipientsFile, "data");
            StrEmailsRecipientsHandler seh = new StrEmailsRecipientsHandler(this.DbPath, recipientsDT);

            seh.LoadToTable();
        }
        /// <summary>
        /// Get the phase based on a given Username
        /// </summary>
        /// <returns></returns>
        public string GetPhase(string emailUsername)
        {
            string resultX = string.Empty;
            StrEmailsRecipientsHandler rHandler = new StrEmailsRecipientsHandler(this.DbPath);
            DataTable dtX = rHandler.LoadFromDbViaUsername(emailUsername);
            DataRow   drX = dtX.AsEnumerable().FirstOrDefault();

            if (drX != null)
            {
                resultX = drX["RecipientGroup"].ToString().Trim();
            }
            return($"PHASE{resultX.Trim()}");
        }
예제 #3
0
        /// <summary>
        /// Get the phase based on a given Username
        /// </summary>
        /// <returns></returns>
        public string GetPhase(string emailUsernames)
        {
            string resultX       = string.Empty;
            string emailUsername = (emailUsernames.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries).FirstOrDefault() ?? string.Empty).Trim();
            StrEmailsRecipientsHandler rHandler = new StrEmailsRecipientsHandler(this.DbPath);
            DataTable dtX = rHandler.LoadFromDbViaUsername(emailUsername);
            DataRow   drX = dtX.AsEnumerable().FirstOrDefault();

            if (drX != null)
            {
                resultX = drX["RecipientGroup"].ToString().Trim();
            }
            return($"PHASE{resultX.Trim()}");
        }
예제 #4
0
        protected override void Execute(NativeActivityContext context)
        {
            try
            {
                string    dbPath       = this.In_DbPath.Get(context);
                DataTable recipientsDT = this.In_StrEmailsRecipientsDT.Get(context);

                StrEmailsRecipientsHandler sERH = new StrEmailsRecipientsHandler(dbPath, recipientsDT);
                sERH.LoadToTable();
            }
            catch (Exception e)
            {
                Console.WriteLine($"[CreateStrEmailsRecipientsTable] Exception >>> {e.Message}");
                throw e;
            }
        }