Compare commits

..
10 Commits
Author SHA1 Message Date
redtea 460b552e1d fix 2024-06-07 12:33:55 +03:00
kbfyf004 6ea58a8181 Merge branch 'main' of https://github.com/iRedTea/PaymentLogs 2024-06-07 14:06:53 +05:00
kbfyf004 6e305fa06f е 2024-06-07 14:06:49 +05:00
redtea 71dd5be182 debt calc 2024-06-07 12:06:02 +03:00
redtea ecfe62cc05 Comments 2024-06-07 11:54:09 +03:00
kbfyf004 c2bb53bc52 Merge branch 'main' of https://github.com/iRedTea/PaymentLogs 2024-06-05 01:11:48 +05:00
kbfyf004 17de1ceea6 g 2024-06-05 01:11:37 +05:00
Denis Istratov 6167316eef Update README.md 2024-06-04 23:11:14 +03:00
kbfyf004 8141d638e4 Delete Clear_and_Reset_Thumbnail_Cache.bat 2024-06-05 00:57:29 +05:00
redtea 4b00c4e4f3 button back 2024-06-04 22:42:49 +03:00
13 changed files with 117 additions and 106 deletions

No files matched your search

+2
View File
@@ -1 +1,3 @@
# PaymentLogs # PaymentLogs
Simple app for editing payment info abount students
@@ -1,16 +0,0 @@
@echo off
:: Created by: Shawn Brink
:: Created on: October 17, 2021
:: Tutorial: https://www.elevenforum.com/t/clear-and-reset-thumbnail-cache-in-windows-11.2051/
echo.
taskkill /f /im explorer.exe
timeout 2 /nobreak>nul
echo.
DEL /F /S /Q /A %LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db
timeout 2 /nobreak>nul
start explorer.exe
Binary file not shown.
-1
View File
@@ -13,6 +13,5 @@ namespace PaymentLogs.Domain
public int CourseId { get; set; } public int CourseId { get; set; }
public int CoursePrice { get; set; } public int CoursePrice { get; set; }
public int Paid { get; set; } public int Paid { get; set; }
public int Debt { get; set; }
} }
} }
+30 -22
View File
@@ -36,6 +36,7 @@
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
@@ -49,11 +50,10 @@
// dataGridView1 // dataGridView1
// //
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(13, 40); this.dataGridView1.Location = new System.Drawing.Point(12, 34);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 62; this.dataGridView1.RowHeadersWidth = 62;
this.dataGridView1.Size = new System.Drawing.Size(973, 634); this.dataGridView1.Size = new System.Drawing.Size(649, 412);
this.dataGridView1.TabIndex = 0; this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
// //
@@ -61,28 +61,25 @@
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.Location = new System.Drawing.Point(1119, 203); this.label1.Location = new System.Drawing.Point(746, 132);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(66, 25); this.label1.Size = new System.Drawing.Size(41, 16);
this.label1.TabIndex = 1; this.label1.TabIndex = 1;
this.label1.Text = "ФИО:"; this.label1.Text = "ФИО:";
// //
// textBox1 // textBox1
// //
this.textBox1.Location = new System.Drawing.Point(1124, 232); this.textBox1.Location = new System.Drawing.Point(749, 151);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox1.Name = "textBox1"; this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(366, 26); this.textBox1.Size = new System.Drawing.Size(245, 20);
this.textBox1.TabIndex = 2; this.textBox1.TabIndex = 2;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(1204, 423); this.button1.Location = new System.Drawing.Point(803, 275);
this.button1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(204, 78); this.button1.Size = new System.Drawing.Size(136, 51);
this.button1.TabIndex = 3; this.button1.TabIndex = 3;
this.button1.Text = "Поиск"; this.button1.Text = "Поиск";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
@@ -93,62 +90,72 @@
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); this.toolStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripSeparator1, this.toolStripSeparator1,
this.toolStripButton3,
this.toolStripButton1, this.toolStripButton1,
this.toolStripSeparator2, this.toolStripSeparator2,
this.toolStripButton2, this.toolStripButton2,
this.toolStripSeparator3}); this.toolStripSeparator3});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 3, 0); this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
this.toolStrip1.Size = new System.Drawing.Size(1593, 34); this.toolStrip1.Size = new System.Drawing.Size(1062, 31);
this.toolStrip1.TabIndex = 6; this.toolStrip1.TabIndex = 6;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator1.Size = new System.Drawing.Size(6, 31);
//
// toolStripButton3
//
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton3.Name = "toolStripButton3";
this.toolStripButton3.Size = new System.Drawing.Size(67, 28);
this.toolStripButton3.Text = "Назад";
this.toolStripButton3.ToolTipText = "toolStripButton3";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click);
// //
// toolStripButton1 // toolStripButton1
// //
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1"; this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(121, 29); this.toolStripButton1.Size = new System.Drawing.Size(89, 28);
this.toolStripButton1.Text = "Обновить"; this.toolStripButton1.Text = "Обновить";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator2.Size = new System.Drawing.Size(6, 31);
// //
// toolStripButton2 // toolStripButton2
// //
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2"; this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(126, 29); this.toolStripButton2.Size = new System.Drawing.Size(94, 28);
this.toolStripButton2.Text = "Сохранить"; this.toolStripButton2.Text = "Сохранить";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator3.Size = new System.Drawing.Size(6, 31);
// //
// DataForm // DataForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1593, 706); this.ClientSize = new System.Drawing.Size(1062, 459);
this.Controls.Add(this.toolStrip1); this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1); this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Controls.Add(this.dataGridView1); this.Controls.Add(this.dataGridView1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "DataForm"; this.Name = "DataForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Главная"; this.Text = "Главная";
@@ -175,6 +182,7 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripButton toolStripButton2; private System.Windows.Forms.ToolStripButton toolStripButton2;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripButton toolStripButton3;
} }
} }
+16 -11
View File
@@ -33,6 +33,7 @@ namespace PaymentLogs
dataGridView1.Columns.Add("course_price", "Цена"); dataGridView1.Columns.Add("course_price", "Цена");
dataGridView1.Columns.Add("paid", "Оплачено"); dataGridView1.Columns.Add("paid", "Оплачено");
dataGridView1.Columns.Add("debt", "Долг"); dataGridView1.Columns.Add("debt", "Долг");
dataGridView1.Columns["debt"].ReadOnly = true;
foreach (Payment payment in Program.PaymentRepository.All()) foreach (Payment payment in Program.PaymentRepository.All())
{ {
if(payment.CourseId != _course.Id) if(payment.CourseId != _course.Id)
@@ -40,7 +41,7 @@ namespace PaymentLogs
continue; continue;
} }
dataGridView1.Rows.Add(payment.Id.ToString(), payment.FCs.ToString(), Program.CourseRepository.Get(payment.CourseId).Name, dataGridView1.Rows.Add(payment.Id.ToString(), payment.FCs.ToString(), Program.CourseRepository.Get(payment.CourseId).Name,
payment.CoursePrice.ToString(), payment.Paid.ToString(), payment.Debt.ToString()); payment.CoursePrice.ToString(), payment.Paid.ToString(), (payment.CoursePrice - payment.Paid).ToString() );
} }
} }
@@ -51,11 +52,6 @@ namespace PaymentLogs
} }
private void toolStripButton3_Click(object sender, EventArgs e)
{
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{ {
@@ -63,6 +59,7 @@ namespace PaymentLogs
private void toolStripButton2_Click(object sender, EventArgs e) private void toolStripButton2_Click(object sender, EventArgs e)
{ {
this.ActiveControl = null;
foreach (DataGridViewRow row in dataGridView1.Rows) foreach (DataGridViewRow row in dataGridView1.Rows)
{ {
try try
@@ -75,8 +72,7 @@ namespace PaymentLogs
FCs = row.Cells["fcs"].Value.ToString(), FCs = row.Cells["fcs"].Value.ToString(),
CourseId = Program.CourseRepository.ByName(row.Cells["course"].Value.ToString()).Id, CourseId = Program.CourseRepository.ByName(row.Cells["course"].Value.ToString()).Id,
CoursePrice = Convert.ToInt32(row.Cells["course_price"].Value), CoursePrice = Convert.ToInt32(row.Cells["course_price"].Value),
Paid = Convert.ToInt32(row.Cells["paid"].Value), Paid = Convert.ToInt32(row.Cells["paid"].Value)
Debt = Convert.ToInt32(row.Cells["debt"].Value)
}; };
Program.PaymentRepository.Update(payment.Id, payment); Program.PaymentRepository.Update(payment.Id, payment);
} }
@@ -112,9 +108,13 @@ namespace PaymentLogs
if (((FCs.Equals(FCsText))) ) if (((FCs.Equals(FCsText))) )
{ {
List<string> list = new List<string> List<string> list = new List<string>
{ row.Cells["id"].Value.ToString(), row.Cells["fcs"].Value.ToString(), { row.Cells["id"].Value.ToString(),
row.Cells["course"].Value.ToString(), row.Cells["course_price"].Value.ToString(), row.Cells["fcs"].Value.ToString(),
row.Cells["paid"].Value.ToString(), row.Cells["debt"].Value.ToString() }; row.Cells["course"].Value.ToString(),
row.Cells["course_price"].Value.ToString(),
row.Cells["paid"].Value.ToString(),
row.Cells["debt"].Value.ToString()
};
filtredList.Add(list); filtredList.Add(list);
} }
@@ -153,5 +153,10 @@ namespace PaymentLogs
} }
private void toolStripButton3_Click(object sender, EventArgs e)
{
this.Hide();
new MainForm().Show();
}
} }
} }
+15 -2
View File
@@ -121,10 +121,23 @@
<value>703, 17</value> <value>703, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF7SURBVEhL7ZU5TsNAFEBDwXIB9uUEFDQICgrEciWgR4hF
NCxnQCAuAUIsB+AAFCwCLgAVvOeJI8AzthM6xJOe/MdxxpOZ/38af54JXMMLfMR3fGiOvT+OHdGHu/iK
e7iAw9jdvDreRz/fQZ+vzQDe4FEzLmMQj/Eaq57NcCVOvp6N6tGFG3iFvd4ow21x5X6pHXz+BLezUQIP
9AVTP3UGp0IYxe3yTJIHb1Z4oDHm8Rlns1GaA1wNYRFTz+z4ST651yqW8DyERZ5wKIQt5tDJYy+OMYLW
SRSLqCeELe7wo8JbzDGL3kJYxEq1iL7S7i8YxfsQFvEMFkP4jXbOYBmTZ2AWWf4xnNwUns5GaQ5xJYRF
zF/z2HyO4eSTIYxigpTWgdi47C2dVPIpbmWjEuxFNi57S92X+NwmXmJlLxJbhY3L3pLarhy3xZU7eb83
6uJKbFzuqeVvhVpE1olXs8UD9XO3pdbKY3hg9hZTzwrN/9HO0Ptj+M9vaDQ+ASTCSqyPOGiaAAAAAElF
TkSuQmCC
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAACTZSURBVHhe7d0H1G1Vee9hRYqCIPaCFbtAbLHX2BsaC/be YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACTZSURBVHhe7d0H1G1Vee9hRYqCIPaCFbtAbLHX2BsaC/be
9cao15ZoEnHEXmI0llhC7BoLxhBbvLaIscSGBQuWxK6osSMK3vt/o+cG8AXO+b797T3X2s8zxm/cES8i 9cao15ZoEnHEXmI0llhC7BoLxhBbvLaIscSGBQuWxK6osSMK3vt/o+cG8AXO+b797T3X2s8zxm/cES8i
nL3WnHuvMudpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA nL3WnHuvMudpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@@ -287,7 +300,7 @@
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAChWSURBVHhe7d17uO5lXefxxUlgUlEED3ggEI0ZLQ8pah7G YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAChWSURBVHhe7d17uO5lXefxxUlgUlEED3ggEI0ZLQ8pah7G
c41pJ7WxFKdhSsmaGCmS1ALHywbHPKZOVpaVmaM2Rug1CZ7lqhlH8dBMpoE6pSKCoqCAgMx8bm5h7+3+ c41pJ7WxFKdhSsmaGCmS1ALHywbHPKZOVpaVmaM2Rug1CZ7lqhlH8dBMpoE6pSKCoqCAgMx8bm5h7+3+
7LXX4fl9vr/nud+v63r/8wX2fvb9W8/+fVnrWc9aW1K3Vw9XJ6qXqrepc9VH1AXqYnWl+n9ERDRZ16kL 7LXX4fl9vr/nud+v63r/8wX2fvb9W8/+fVnrWc9aW1K3Vw9XJ6qXqrepc9VH1AXqYnWl+n9ERDRZ16kL
1UfVX6hnqDspYCH2Vz+gnqPepS5T7gORiIjm0fvVgxWwaYepX1RvV5cr9wFGRETzrn12tn3GFljXTdTj 1UfVX6hnqDspYCH2Vz+gnqPepS5T7gORiIjm0fvVgxWwaYepX1RvV5cr9wFGRETzrn12tn3GFljXTdTj
+19 -21
View File
@@ -54,50 +54,49 @@
this.toolStripSeparator3}); this.toolStripSeparator3});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 3, 0); this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
this.toolStrip1.Size = new System.Drawing.Size(1422, 34); this.toolStrip1.Size = new System.Drawing.Size(948, 31);
this.toolStrip1.TabIndex = 13; this.toolStrip1.TabIndex = 13;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator1.Size = new System.Drawing.Size(6, 31);
// //
// toolStripButton1 // toolStripButton1
// //
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1"; this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(121, 29); this.toolStripButton1.Size = new System.Drawing.Size(89, 28);
this.toolStripButton1.Text = "Обновить"; this.toolStripButton1.Text = "Обновить";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator2.Size = new System.Drawing.Size(6, 31);
// //
// toolStripButton2 // toolStripButton2
// //
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2"; this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(126, 29); this.toolStripButton2.Size = new System.Drawing.Size(94, 28);
this.toolStripButton2.Text = "Сохранить"; this.toolStripButton2.Text = "Сохранить";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator3.Size = new System.Drawing.Size(6, 31);
// //
// textBox2 // textBox2
// //
this.textBox2.Location = new System.Drawing.Point(986, 288); this.textBox2.Location = new System.Drawing.Point(657, 187);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox2.Name = "textBox2"; this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(366, 26); this.textBox2.Size = new System.Drawing.Size(245, 20);
this.textBox2.TabIndex = 12; this.textBox2.TabIndex = 12;
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged); this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
// //
@@ -105,19 +104,17 @@
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label2.Location = new System.Drawing.Point(981, 260); this.label2.Location = new System.Drawing.Point(654, 169);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(203, 22); this.label2.Size = new System.Drawing.Size(139, 15);
this.label2.TabIndex = 11; this.label2.TabIndex = 11;
this.label2.Text = "Наименование курсов:"; this.label2.Text = "Наименование курсов:";
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(1066, 392); this.button1.Location = new System.Drawing.Point(711, 255);
this.button1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(204, 78); this.button1.Size = new System.Drawing.Size(136, 51);
this.button1.TabIndex = 10; this.button1.TabIndex = 10;
this.button1.Text = "Поиск"; this.button1.Text = "Поиск";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
@@ -126,26 +123,27 @@
// dataGridView1 // dataGridView1
// //
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(0, 37); this.dataGridView1.Location = new System.Drawing.Point(0, 24);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 62; this.dataGridView1.RowHeadersWidth = 62;
this.dataGridView1.Size = new System.Drawing.Size(945, 597); this.dataGridView1.Size = new System.Drawing.Size(630, 388);
this.dataGridView1.TabIndex = 7; this.dataGridView1.TabIndex = 7;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
// //
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1422, 692); this.ClientSize = new System.Drawing.Size(948, 450);
this.Controls.Add(this.toolStrip1); this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.textBox2); this.Controls.Add(this.textBox2);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Controls.Add(this.dataGridView1); this.Controls.Add(this.dataGridView1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "MainForm"; this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Главная"; this.Text = "Главная";
this.Load += new System.EventHandler(this.Form2_Load); this.Load += new System.EventHandler(this.Form2_Load);
this.toolStrip1.ResumeLayout(false); this.toolStrip1.ResumeLayout(false);
+2 -2
View File
@@ -124,7 +124,7 @@
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAACTZSURBVHhe7d0H1G1Vee9hRYqCIPaCFbtAbLHX2BsaC/be YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACTZSURBVHhe7d0H1G1Vee9hRYqCIPaCFbtAbLHX2BsaC/be
9cao15ZoEnHEXmI0llhC7BoLxhBbvLaIscSGBQuWxK6osSMK3vt/o+cG8AXO+b797T3X2s8zxm/cES8i 9cao15ZoEnHEXmI0llhC7BoLxhBbvLaIscSGBQuWxK6osSMK3vt/o+cG8AXO+b797T3X2s8zxm/cES8i
nL3WnHuvMudpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA nL3WnHuvMudpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@@ -287,7 +287,7 @@
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAChWSURBVHhe7d17uO5lXefxxUlgUlEED3ggEI0ZLQ8pah7G YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAChWSURBVHhe7d17uO5lXefxxUlgUlEED3ggEI0ZLQ8pah7G
c41pJ7WxFKdhSsmaGCmS1ALHywbHPKZOVpaVmaM2Rug1CZ7lqhlH8dBMpoE6pSKCoqCAgMx8bm5h7+3+ c41pJ7WxFKdhSsmaGCmS1ALHywbHPKZOVpaVmaM2Rug1CZ7lqhlH8dBMpoE6pSKCoqCAgMx8bm5h7+3+
7LXX4fl9vr/nud+v63r/8wX2fvb9W8/+fVnrWc9aW1K3Vw9XJ6qXqrepc9VH1AXqYnWl+n9ERDRZ16kL 7LXX4fl9vr/nud+v63r/8wX2fvb9W8/+fVnrWc9aW1K3Vw9XJ6qXqrepc9VH1AXqYnWl+n9ERDRZ16kL
1UfVX6hnqDspYCH2Vz+gnqPepS5T7gORiIjm0fvVgxWwaYepX1RvV5cr9wFGRETzrn12tn3GFljXTdTj 1UfVX6hnqDspYCH2Vz+gnqPepS5T7gORiIjm0fvVgxWwaYepX1RvV5cr9wFGRETzrn12tn3GFljXTdTj
+19 -23
View File
@@ -57,22 +57,22 @@
this.toolStripSeparator3}); this.toolStripSeparator3});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 3, 0); this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
this.toolStrip1.Size = new System.Drawing.Size(1750, 34); this.toolStrip1.Size = new System.Drawing.Size(1167, 31);
this.toolStrip1.TabIndex = 13; this.toolStrip1.TabIndex = 13;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator1.Size = new System.Drawing.Size(6, 31);
// //
// toolStripButton3 // toolStripButton3
// //
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image"))); this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton3.Name = "toolStripButton3"; this.toolStripButton3.Name = "toolStripButton3";
this.toolStripButton3.Size = new System.Drawing.Size(89, 29); this.toolStripButton3.Size = new System.Drawing.Size(67, 28);
this.toolStripButton3.Text = "Назад"; this.toolStripButton3.Text = "Назад";
this.toolStripButton3.ToolTipText = "toolStripButton3"; this.toolStripButton3.ToolTipText = "toolStripButton3";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click); this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click);
@@ -82,35 +82,34 @@
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1"; this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(121, 29); this.toolStripButton1.Size = new System.Drawing.Size(89, 28);
this.toolStripButton1.Text = "Обновить"; this.toolStripButton1.Text = "Обновить";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator2.Size = new System.Drawing.Size(6, 31);
// //
// toolStripButton2 // toolStripButton2
// //
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2"; this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(126, 29); this.toolStripButton2.Size = new System.Drawing.Size(94, 28);
this.toolStripButton2.Text = "Сохранить"; this.toolStripButton2.Text = "Сохранить";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 34); this.toolStripSeparator3.Size = new System.Drawing.Size(6, 31);
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(1450, 383); this.button1.Location = new System.Drawing.Point(967, 249);
this.button1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(204, 78); this.button1.Size = new System.Drawing.Size(136, 51);
this.button1.TabIndex = 10; this.button1.TabIndex = 10;
this.button1.Text = "Поиск"; this.button1.Text = "Поиск";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
@@ -118,10 +117,9 @@
// //
// textBox1 // textBox1
// //
this.textBox1.Location = new System.Drawing.Point(1365, 314); this.textBox1.Location = new System.Drawing.Point(910, 204);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox1.Name = "textBox1"; this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(366, 26); this.textBox1.Size = new System.Drawing.Size(245, 20);
this.textBox1.TabIndex = 9; this.textBox1.TabIndex = 9;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
// //
@@ -129,10 +127,9 @@
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.Location = new System.Drawing.Point(1360, 285); this.label1.Location = new System.Drawing.Point(907, 185);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(66, 25); this.label1.Size = new System.Drawing.Size(41, 16);
this.label1.TabIndex = 8; this.label1.TabIndex = 8;
this.label1.Text = "ФИО:"; this.label1.Text = "ФИО:";
// //
@@ -145,27 +142,26 @@
// dataGridView1 // dataGridView1
// //
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(13, 39); this.dataGridView1.Location = new System.Drawing.Point(9, 25);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 62; this.dataGridView1.RowHeadersWidth = 62;
this.dataGridView1.Size = new System.Drawing.Size(1328, 634); this.dataGridView1.Size = new System.Drawing.Size(885, 412);
this.dataGridView1.TabIndex = 7; this.dataGridView1.TabIndex = 7;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
// //
// StudentsForm // StudentsForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1750, 702); this.ClientSize = new System.Drawing.Size(1167, 456);
this.Controls.Add(this.toolStrip1); this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1); this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Controls.Add(this.dataGridView1); this.Controls.Add(this.dataGridView1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "StudentsForm"; this.Name = "StudentsForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Специальность"; this.Text = "Специальность";
this.Load += new System.EventHandler(this.Form1_Load); this.Load += new System.EventHandler(this.Form1_Load);
this.toolStrip1.ResumeLayout(false); this.toolStrip1.ResumeLayout(false);
+3 -3
View File
@@ -124,7 +124,7 @@
<data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAF7SURBVEhL7ZU5TsNAFEBDwXIB9uUEFDQICgrEciWgR4hF YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF7SURBVEhL7ZU5TsNAFEBDwXIB9uUEFDQICgrEciWgR4hF
NCxnQCAuAUIsB+AAFCwCLgAVvOeJI8AzthM6xJOe/MdxxpOZ/38af54JXMMLfMR3fGiOvT+OHdGHu/iK NCxnQCAuAUIsB+AAFCwCLgAVvOeJI8AzthM6xJOe/MdxxpOZ/38af54JXMMLfMR3fGiOvT+OHdGHu/iK
e7iAw9jdvDreRz/fQZ+vzQDe4FEzLmMQj/Eaq57NcCVOvp6N6tGFG3iFvd4ow21x5X6pHXz+BLezUQIP e7iAw9jdvDreRz/fQZ+vzQDe4FEzLmMQj/Eaq57NcCVOvp6N6tGFG3iFvd4ow21x5X6pHXz+BLezUQIP
9AVTP3UGp0IYxe3yTJIHb1Z4oDHm8Rlns1GaA1wNYRFTz+z4ST651yqW8DyERZ5wKIQt5tDJYy+OMYLW 9AVTP3UGp0IYxe3yTJIHb1Z4oDHm8Rlns1GaA1wNYRFTz+z4ST651yqW8DyERZ5wKIQt5tDJYy+OMYLW
@@ -137,7 +137,7 @@
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAACTZSURBVHhe7d0H1G1Vee9hRYqCIPaCFbtAbLHX2BsaC/be YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACTZSURBVHhe7d0H1G1Vee9hRYqCIPaCFbtAbLHX2BsaC/be
9cao15ZoEnHEXmI0llhC7BoLxhBbvLaIscSGBQuWxK6osSMK3vt/o+cG8AXO+b797T3X2s8zxm/cES8i 9cao15ZoEnHEXmI0llhC7BoLxhBbvLaIscSGBQuWxK6osSMK3vt/o+cG8AXO+b797T3X2s8zxm/cES8i
nL3WnHuvMudpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA nL3WnHuvMudpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@@ -300,7 +300,7 @@
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAChWSURBVHhe7d17uO5lXefxxUlgUlEED3ggEI0ZLQ8pah7G YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAChWSURBVHhe7d17uO5lXefxxUlgUlEED3ggEI0ZLQ8pah7G
c41pJ7WxFKdhSsmaGCmS1ALHywbHPKZOVpaVmaM2Rug1CZ7lqhlH8dBMpoE6pSKCoqCAgMx8bm5h7+3+ c41pJ7WxFKdhSsmaGCmS1ALHywbHPKZOVpaVmaM2Rug1CZ7lqhlH8dBMpoE6pSKCoqCAgMx8bm5h7+3+
7LXX4fl9vr/nud+v63r/8wX2fvb9W8/+fVnrWc9aW1K3Vw9XJ6qXqrepc9VH1AXqYnWl+n9ERDRZ16kL 7LXX4fl9vr/nud+v63r/8wX2fvb9W8/+fVnrWc9aW1K3Vw9XJ6qXqrepc9VH1AXqYnWl+n9ERDRZ16kL
1UfVX6hnqDspYCH2Vz+gnqPepS5T7gORiIjm0fvVgxWwaYepX1RvV5cr9wFGRETzrn12tn3GFljXTdTj 1UfVX6hnqDspYCH2Vz+gnqPepS5T7gORiIjm0fvVgxWwaYepX1RvV5cr9wFGRETzrn12tn3GFljXTdTj
+4 -5
View File
@@ -29,8 +29,7 @@ namespace PaymentLogs.Repositories
FCs = reader.GetString("fcs"), FCs = reader.GetString("fcs"),
CourseId = reader.GetInt32("course_id"), CourseId = reader.GetInt32("course_id"),
CoursePrice = reader.GetInt32("course_price"), CoursePrice = reader.GetInt32("course_price"),
Paid = reader.GetInt32("paid"), Paid = reader.GetInt32("paid")
Debt = reader.GetInt32("debt")
}; };
_data[payment.Id] = payment; _data[payment.Id] = payment;
@@ -45,10 +44,10 @@ namespace PaymentLogs.Repositories
db.openConnection(); db.openConnection();
foreach(Payment payment in _data.Values) foreach(Payment payment in _data.Values)
{ {
string sql = $" INSERT INTO `payments` (`id`, `fcs`, `course_id`, `course_price`, `paid`, `debt`) " + string sql = $" INSERT INTO `payments` (`id`, `fcs`, `course_id`, `course_price`, `paid`) " +
$"VALUES ('{payment.Id}','{payment.FCs}', '{payment.CourseId}', '{payment.CoursePrice}', '{payment.Paid}', '{payment.Debt}') " + $"VALUES ('{payment.Id}','{payment.FCs}', '{payment.CourseId}', '{payment.CoursePrice}', '{payment.Paid}') " +
$"ON DUPLICATE KEY UPDATE `fcs`='{payment.FCs}', `course_id`='{payment.CourseId}', `course_price` = '{payment.CoursePrice}', " + $"ON DUPLICATE KEY UPDATE `fcs`='{payment.FCs}', `course_id`='{payment.CourseId}', `course_price` = '{payment.CoursePrice}', " +
$"`paid` = '{payment.Paid}', `debt`='{payment.Debt}'"; $"`paid` = '{payment.Paid}'";
MySqlCommand cmd = new MySqlCommand(sql, db.getConnection()); MySqlCommand cmd = new MySqlCommand(sql, db.getConnection());
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
+7
View File
@@ -8,17 +8,24 @@ namespace PaymentLogs.Repositories
{ {
internal abstract class Repo<K, V> internal abstract class Repo<K, V>
{ {
// в словаре хранится кеш данных
protected Dictionary<K, V> _data = new Dictionary<K, V>(); protected Dictionary<K, V> _data = new Dictionary<K, V>();
// загрузка данных из базы данных
public abstract void Load(); public abstract void Load();
// получение всех данных из кеша
public virtual List<V> All() public virtual List<V> All()
{ {
return _data.Values.ToList(); return _data.Values.ToList();
} }
// получение конкретного экземпляра по id/ключу
public virtual V Get(K key) { return _data[key]; } public virtual V Get(K key) { return _data[key]; }
//обновление данных в кеше
public virtual void Update(K key, V value) public virtual void Update(K key, V value)
{ {
_data[key] = value; _data[key] = value;
} }
// сохранение данных из кеша в базу данных
public abstract void Save(); public abstract void Save();
} }