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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
| private void Teal_Click(object sender, EventArgs e)
{
try
{
string myConnection = System.Configuration.ConfigurationManager.ConnectionStrings["myDatabaseConnection"].ConnectionString;
using (var MyConn2 = new MySqlConnection(myConnection))
{
save.Text = "Сохранения сессии. Подождите";
var MyCommand2 = new MySqlCommand("UPDATE clients SET Tema1_1=@Tema1_1, Tema1_2=@Tema1_2, Tema1_3=@Tema1_3, Tema1_4=@Tema1_4, Tema1_5=@Tema1_5, Tema1_6=@Tema1_6, Tema1_7=@Tema1_7, Tema1_8=@Tema1_8, 1_1_d=@1_1_d,1_2_d=@1_2_d,1_3_d=@1_3_d,1_4_d=@1_4_d,1_5_d=@1_5_d,1_6_d=@1_6_d,1_7_d=@1_7_d,1_8_d=@1_8_d,location=@location WHERE id=@id", MyConn2);
var MyCommand3 = new MySqlCommand("UPDATE clients SET Tema2_1=@Tema2_1, Tema2_2=@Tema2_2, Tema2_3=@Tema2_3, Tema2_4=@Tema2_4, Tema2_5=@Tema2_5, 2_1_d=@2_1_d,2_2_d=@2_2_d,2_3_d=@2_3_d,2_4_d=@2_4_d,2_5_d=@2_5_d,location=@location WHERE id=@id", MyConn2);
var MyCommand4 = new MySqlCommand("UPDATE clients SET Tema3_1=@Tema3_1, Tema3_2=@Tema3_2, Tema3_3=@Tema3_3, Tema3_4=@Tema3_4, Tema3_5=@Tema3_5,Tema3_6=@Tema3_6, 3_1_d=@3_1_d,3_2_d=@3_2_d,3_3_d=@3_3_d,3_4_d=@3_4_d,3_5_d=@3_5_d,3_6_d=@3_6_d,location=@location WHERE id=@id", MyConn2);
MyCommand2.Parameters.AddWithValue("@location", memory.sValue_location);
MyCommand2.Parameters.AddWithValue("@id", memory.sValue_id);
MyCommand2.Parameters.AddWithValue("@Tema1_1", theme.sValue_them1_1);
MyCommand2.Parameters.AddWithValue("@Tema1_2", theme.sValue_them1_2);
MyCommand2.Parameters.AddWithValue("@Tema1_3", theme.sValue_them1_3);
MyCommand2.Parameters.AddWithValue("@Tema1_4", theme.sValue_them1_4);
MyCommand2.Parameters.AddWithValue("@Tema1_5", theme.sValue_them1_5);
MyCommand2.Parameters.AddWithValue("@Tema1_6", theme.sValue_them1_6);
MyCommand2.Parameters.AddWithValue("@Tema1_7", theme.sValue_them1_7);
MyCommand2.Parameters.AddWithValue("@Tema1_8", theme.sValue_them1_8);
MyCommand2.Parameters.AddWithValue("@1_1_d", theme.sValue_1_1_d);
MyCommand2.Parameters.AddWithValue("@1_2_d", theme.sValue_1_2_d);
MyCommand2.Parameters.AddWithValue("@1_3_d", theme.sValue_1_3_d);
MyCommand2.Parameters.AddWithValue("@1_4_d", theme.sValue_1_4_d);
MyCommand2.Parameters.AddWithValue("@1_5_d", theme.sValue_1_5_d);
MyCommand2.Parameters.AddWithValue("@1_6_d", theme.sValue_1_6_d);
MyCommand2.Parameters.AddWithValue("@1_7_d", theme.sValue_1_7_d);
MyCommand2.Parameters.AddWithValue("@1_8_d", theme.sValue_1_8_d);
MyCommand3.Parameters.AddWithValue("@location", memory.sValue_location);
MyCommand3.Parameters.AddWithValue("@id", memory.sValue_id);
MyCommand3.Parameters.AddWithValue("@Tema2_1", theme.sValue_them2_1);
MyCommand3.Parameters.AddWithValue("@Tema2_2", theme.sValue_them2_2);
MyCommand3.Parameters.AddWithValue("@Tema2_3", theme.sValue_them2_3);
MyCommand3.Parameters.AddWithValue("@Tema2_4", theme.sValue_them2_4);
MyCommand3.Parameters.AddWithValue("@Tema2_5", theme.sValue_them2_5);
MyCommand3.Parameters.AddWithValue("@2_1_d", theme.sValue_2_1_d);
MyCommand3.Parameters.AddWithValue("@2_2_d", theme.sValue_2_2_d);
MyCommand3.Parameters.AddWithValue("@2_3_d", theme.sValue_2_3_d);
MyCommand3.Parameters.AddWithValue("@2_4_d", theme.sValue_2_4_d);
MyCommand3.Parameters.AddWithValue("@2_5_d", theme.sValue_2_5_d);
MyCommand4.Parameters.AddWithValue("@location", memory.sValue_location);
MyCommand4.Parameters.AddWithValue("@id", memory.sValue_id);
MyCommand4.Parameters.AddWithValue("@Tema3_1", theme.sValue_them3_1);
MyCommand4.Parameters.AddWithValue("@Tema3_2", theme.sValue_them3_2);
MyCommand4.Parameters.AddWithValue("@Tema3_3", theme.sValue_them3_3);
MyCommand4.Parameters.AddWithValue("@Tema3_4", theme.sValue_them3_4);
MyCommand4.Parameters.AddWithValue("@Tema3_5", theme.sValue_them3_5);
MyCommand4.Parameters.AddWithValue("@Tema3_6", theme.sValue_them3_5);
MyCommand4.Parameters.AddWithValue("@3_1_d", theme.sValue_3_1_d);
MyCommand4.Parameters.AddWithValue("@3_2_d", theme.sValue_3_2_d);
MyCommand4.Parameters.AddWithValue("@3_3_d", theme.sValue_3_3_d);
MyCommand4.Parameters.AddWithValue("@3_4_d", theme.sValue_3_4_d);
MyCommand4.Parameters.AddWithValue("@3_5_d", theme.sValue_3_5_d);
MyCommand4.Parameters.AddWithValue("@3_6_d", theme.sValue_3_6_d);
MyConn2.Open();
save.Text = "Сохранения сессии. Подождите..";
MyCommand2.ExecuteNonQuery();
}
save.Text = "Успешно !!! ";
this.Close();
Application.Exit();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
} |