-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCourses_Valutes.cs
39 lines (36 loc) · 1.3 KB
/
Courses_Valutes.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Windows.Forms;
namespace Cours_Remind_Weekened
{
public partial class Courses_Valutes : Form
{
public Courses_Valutes()
{
InitializeComponent();
}
private async void Update_Click(object sender, EventArgs e)
{
var dateNow = new DateTimePicker
{
Value = DateTime.UtcNow
};
if (DateAt.Value < DateBefore.Value && DateAt.Value< dateNow.Value && DateBefore.Value <= dateNow.Value)
{
ServiceReference1.DailyInfoSoapClient client = new ServiceReference1.DailyInfoSoapClient();
var data = await client.DragMetDynamicAsync(DateAt.Value, DateBefore.Value);
Data2.DataSource = data.Tables[0];
}
else
{
MessageBox.Show("Мы не можем заглянуть в будущее, выберите коректные даты",
"Внимание",
MessageBoxButtons.OK,
MessageBoxIcon.Information,
MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly);
DateAt = dateNow;
DateBefore = dateNow;
}
}
}
}