Esempio n. 1
0
        public void addEmails()
        {
            string email1 = string.Empty;
            string email2 = string.Empty;
            string email3 = string.Empty;
            string email4 = string.Empty;
            string email5 = string.Empty;
            string email6 = string.Empty;
            string email7 = string.Empty;
            string email8 = string.Empty;

            try
            {
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    if (!string.IsNullOrEmpty(txtEmail1c.Text))
                    {
                        email1 = "PE" + Resources.Constants.CROSSLORAINE + txtEmail1c.Text + Resources.Constants.CROSSLORAINE;
                        objCommands.SendReceiveEmail(email1, 1, 1, false);
                    }
                    if (!string.IsNullOrEmpty(txtEmail2c.Text))
                    {
                        email2 = "PE" + Resources.Constants.CROSSLORAINE + txtEmail2c.Text + Resources.Constants.CROSSLORAINE;
                        objCommands.SendReceiveEmail(email2, 1, 1, false);
                    }
                    if (!string.IsNullOrEmpty(txtEmail3c.Text))
                    {
                        email3 = "PE" + Resources.Constants.CROSSLORAINE + txtEmail3c.Text + Resources.Constants.CROSSLORAINE;
                        objCommands.SendReceiveEmail(email3, 1, 1, false);
                    }
                    if (!string.IsNullOrEmpty(txtEmail4c.Text))
                    {
                        email4 = "PE" + Resources.Constants.CROSSLORAINE + txtEmail4c.Text + Resources.Constants.CROSSLORAINE;
                        objCommands.SendReceiveEmail(email4, 1, 1, false);
                    }
                    if (!string.IsNullOrEmpty(txtEmail5c.Text))
                    {
                        email5 = "PE" + Resources.Constants.CROSSLORAINE + txtEmail5c.Text + Resources.Constants.CROSSLORAINE;
                        objCommands.SendReceiveEmail(email5, 1, 1, false);
                    }
                    if (!string.IsNullOrEmpty(txtEmail6c.Text))
                    {
                        email6 = "PE" + Resources.Constants.CROSSLORAINE + txtEmail6c.Text + Resources.Constants.CROSSLORAINE;
                        objCommands.SendReceiveEmail(email6, 1, 1, false);
                    }
                    if (!string.IsNullOrEmpty(txtEmail7c.Text))
                    {
                        email7 = "PE" + Resources.Constants.CROSSLORAINE + txtEmail7c.Text + Resources.Constants.CROSSLORAINE;
                        objCommands.SendReceiveEmail(email7, 1, 1, false);
                    }
                    if (!string.IsNullOrEmpty(txtEmail8c.Text))
                    {
                        email8 = "PE" + Resources.Constants.CROSSLORAINE + txtEmail8c.Text + Resources.Constants.CROSSLORAINE;
                        objCommands.SendReceiveEmail(email8, 1, 1, false);
                    }
                    objCommands.SendReceive(Resources.Constants.COMMANDS_AST_PE);
                }
            }
            catch (Exception Err)
            {
                throw new Exception();
            }
        }