private void SendBtn_Click(object sender, RoutedEventArgs e)
 {
     obj       = new OptionData();
     obj.Email = TB_Email.Text;
     Serializer.Serilize(obj);
     SendEmailHalper.SendEmailTo(obj.Email);
 }
Exemple #2
0
        private void SelectFile_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (FileList.SelectedItem == null)
                {
                    MessageBox.Show((string)Application.Current.Resources["msb_fileNotSekected"], "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                    return;
                }
                if (TB_Email.Text == string.Empty)
                {
                    MessageBox.Show((string)Application.Current.Resources["msb_emailNotEntered"], "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                    return;
                }

                RfidContext db = new RfidContext();

                string path = Singelton.ExcelSetting.Path + System.IO.Path.DirectorySeparatorChar + FileList.SelectedItem.ToString();

                Singelton.EmailSetting.PathAttachmentFile = path;

                SendEmailHalper.SendEmailTo(TB_Email.Text);

                SVGenerationExcel.Visibility = Visibility.Visible;
                AllExcelFiles.Visibility     = Visibility.Collapsed;
            }
            catch (FormatException)
            {
                MessageBox.Show((string)Application.Current.Resources["msb_emailUnknownError"], "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Exemple #3
0
 private void SendBtn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         obj       = new OptionData();
         obj.Email = TB_Email.Text;
         Serializer.Serilize(obj);
         SendEmailHalper.SendEmailTo(obj.Email);
     }
     catch (Exception ex)
     {
         App.SendException(ex);
     }
 }