Пример #1
0
 private void btnReply_Click(object sender, EventArgs e)
 {
     //this simply calls the replyemail function within the compose email screen
     FrmComposeEmail EmailClient = new FrmComposeEmail();
     EmailClient.ReplyEmail(EmailAddress, EmailSubject, EmailContent);
     EmailClient.Show();
 }
Пример #2
0
        private void btnReply_Click(object sender, EventArgs e)
        {
            //this simply calls the replyemail function within the compose email screen
            FrmComposeEmail EmailClient = new FrmComposeEmail();

            EmailClient.ReplyEmail(EmailAddress, EmailSubject, EmailContent);
            EmailClient.Show();
        }
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            //a bit of linq to convert the lstbxcontacts to a generic list
            ///FIXTHISBITTTTTT
            List<string> EmailAddresses = lstBxContacts.SelectedItems.OfType<string>().ToList();

            //instantiation of the frmcomposemail form
            FrmComposeEmail SendAddresses = new FrmComposeEmail();
            SendAddresses.AcceptEmails(EmailAddresses);
            //this shows the email compostion page
            SendAddresses.Show();

            this.Close();
        }
Пример #4
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            //a bit of linq to convert the lstbxcontacts to a generic list
            ///FIXTHISBITTTTTT
            List <string> EmailAddresses = lstBxContacts.SelectedItems.OfType <string>().ToList();

            //instantiation of the frmcomposemail form
            FrmComposeEmail SendAddresses = new FrmComposeEmail();

            SendAddresses.AcceptEmails(EmailAddresses);
            //this shows the email compostion page
            SendAddresses.Show();

            this.Close();
        }
        /// <summary>
        /// This is a private function
        /// that sorts out whether the user would like to compose a group email or an individual email
        /// </summary>
        private void showEmail()
        {
            //this runs of the user has selected group email
            if (IsGroup == true)
            {
            }
            else
            {
                //create a new instance of the frmComposeEmail form
                FrmComposeEmail NewIndividualEmail = new FrmComposeEmail();

                //this sends us to the NewEmail function in the NewIndividualEmail class
                NewIndividualEmail.NewEmail();

                //this shows the new form
                NewIndividualEmail.Show();
            }
        }
        private void btnProceed_Click(object sender, EventArgs e)
        {
            //this checks to see if the user has selected an item from the listbox, as the default value is -1
            if (LstBxSavedSearch.SelectedIndex > -1)
            {
                string ListResult = LstBxSavedSearch.SelectedItem.ToString();

                Int32 AgeFrom = Convert.ToInt32(ListResult.Substring(7, 2));

                Int32 AgeTo = Convert.ToInt32(ListResult.Substring(10, 2));

                string Location = ListResult.Substring(22);

                clsCustomerSavedSearch NewSearch = new clsCustomerSavedSearch();
                string EmailAddress = NewSearch.SavedSearch(AgeFrom, AgeTo, Location);

                //this runs if the email address is initalised but never appended.
                if (EmailAddress == "")
                {
                    MessageBox.Show("No results found!");
                }
                else
                {
                    //this sends us to the showemail function with the IsGroup Bool value being set to true
                    IsGroup = true;
                    FrmComposeEmail newEmail = new FrmComposeEmail();
                    newEmail.GroupEmail(EmailAddress);

                    newEmail.Show();

                    //this closes the current form
                    this.Close();
                }



            }
            else
            {
                //this gives us an error message as nothing as been selected
                lblError.Text = "Please Select an item from the listbox";
            }
        }
        private void btnProceed_Click(object sender, EventArgs e)
        {
            //this checks to see if the user has selected an item from the listbox, as the default value is -1
            if (LstBxSavedSearch.SelectedIndex > -1)
            {
                string ListResult = LstBxSavedSearch.SelectedItem.ToString();

                Int32 AgeFrom = Convert.ToInt32(ListResult.Substring(7, 2));

                Int32 AgeTo = Convert.ToInt32(ListResult.Substring(10, 2));

                string Location = ListResult.Substring(22);

                clsCustomerSavedSearch NewSearch = new clsCustomerSavedSearch();
                string EmailAddress = NewSearch.SavedSearch(AgeFrom, AgeTo, Location);

                //this runs if the email address is initalised but never appended.
                if (EmailAddress == "")
                {
                    MessageBox.Show("No results found!");
                }
                else
                {
                    //this sends us to the showemail function with the IsGroup Bool value being set to true
                    IsGroup = true;
                    FrmComposeEmail newEmail = new FrmComposeEmail();
                    newEmail.GroupEmail(EmailAddress);

                    newEmail.Show();

                    //this closes the current form
                    this.Close();
                }
            }
            else
            {
                //this gives us an error message as nothing as been selected
                lblError.Text = "Please Select an item from the listbox";
            }
        }
        /// <summary>
        /// This is a private function
        /// that sorts out whether the user would like to compose a group email or an individual email
        /// </summary>
        private void showEmail()
        {
            //this runs of the user has selected group email
            if (IsGroup == true)
            {
            }
            else
            {
                //create a new instance of the frmComposeEmail form
                FrmComposeEmail NewIndividualEmail = new FrmComposeEmail();

                //this sends us to the NewEmail function in the NewIndividualEmail class
                NewIndividualEmail.NewEmail();

                //this shows the new form
                NewIndividualEmail.Show();
            }
        }