示例#1
0
        private async void ButtonMoveClick(object sender, RoutedEventArgs e)
        {
            hour   = textBlockHour.Text;
            minute = textBlockMinute.Text;
            time   = hour + minute;
            Thread thread = new Thread(ShowDate);

            using (var context = new ContextTypes())
            {
                move = new MoveInformation
                {
                    PathFrom = System.IO.Path.Combine(textBoxMoveFirst.Text),
                    PathTo   = textBoxMoveSecond.Text,
                    Data     = datePiker.SelectedDate.Value,
                    Time     = time
                };
                context.Moving.Add(move);
                await context.SaveChangesAsync();
            }
        }
示例#2
0
        private async void ButtonDownloadClick(object sender, RoutedEventArgs e)
        {
            hour   = textBlockHour.Text;
            minute = textBlockMinute.Text;
            time   = hour + minute;
            Thread thread = new Thread(ShowDate);

            using (var context = new ContextTypes())
            {
                downLoad = new DownLoadInformation
                {
                    UrlAddress = textBoxDownload.Text,
                    FileName   = textBoxDownloadName.Text,
                    Data       = datePiker.SelectedDate.Value,
                    Time       = time
                };
                context.DownLoad.Add(downLoad);
                await context.SaveChangesAsync();
            }
        }
示例#3
0
        private async void ButtonClickToSend(object sender, RoutedEventArgs e)
        {
            hour   = textBlockHour.Text;
            minute = textBlockMinute.Text;
            time   = hour + minute;
            Thread thread = new Thread(ShowDate);

            using (var context = new ContextTypes())
            {
                email = new SendEmailInformation
                {
                    NameFrom = textBoxSendFrom.Text,
                    NameTo   = textBoxSendTo.Text,
                    Text     = textBoxSendMessage.Text,
                    Data     = datePiker.SelectedDate.Value,
                    Time     = time
                };
                context.SendEmail.Add(email);
                await context.SaveChangesAsync();
            }
        }