Some fixes
This commit is contained in:
1 parent
1f6634add4
commit
c2ae11a61b
22 files changed
+47
-2
No files matched your search
Generated
+1
@@ -154,6 +154,7 @@
|
||||
this.toolStripButton2.Name = "toolStripButton2";
|
||||
this.toolStripButton2.Size = new System.Drawing.Size(126, 29);
|
||||
this.toolStripButton2.Text = "Сохранить";
|
||||
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
|
||||
+26
-1
@@ -27,12 +27,14 @@ namespace PaymentLogs
|
||||
dataGridView1.Columns.Add("fcs", "ФИО");
|
||||
dataGridView1.Columns.Add("course", "Курс");
|
||||
dataGridView1.Columns.Add("course_price", "Цена");
|
||||
dataGridView1.Columns.Add("paid", "Оплачено");
|
||||
dataGridView1.Columns.Add("debt", "Долг");
|
||||
/* BindingList<Payment> list1 = new BindingList<Payment>();
|
||||
dataGridView1.DataSource = list1;*/
|
||||
foreach (Payment payment in Program.PaymentRepository.All())
|
||||
{
|
||||
dataGridView1.Rows.Add(payment.Id.ToString(), payment.FCs, Program.CourseRepository.ById(payment.CourseId).Name, payment.CoursePrice.ToString(), payment.Debt.ToString());
|
||||
dataGridView1.Rows.Add(payment.Id.ToString(), payment.FCs, Program.CourseRepository.Get(payment.CourseId).Name,
|
||||
payment.CoursePrice.ToString(), payment.Paid.ToString(), payment.Debt.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,5 +52,28 @@ namespace PaymentLogs
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void toolStripButton2_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (DataGridViewRow row in dataGridView1.Rows)
|
||||
{
|
||||
try
|
||||
{
|
||||
Payment payment = new Payment
|
||||
{
|
||||
Id = Convert.ToInt32(row.Cells["id"].Value),
|
||||
FCs = row.Cells["fcs"].ToString(),
|
||||
CourseId = Program.CourseRepository.ByName(row.Cells["course"].Value.ToString()).Id,
|
||||
CoursePrice = Convert.ToInt32(row.Cells["course_price"].Value),
|
||||
Paid = Convert.ToInt32(row.Cells["paid"].Value),
|
||||
Debt = Convert.ToInt32(row.Cells["debt"].Value)
|
||||
};
|
||||
Program.PaymentRepository.Update(payment.Id, payment);
|
||||
} catch(NullReferenceException ignored)
|
||||
{ }
|
||||
|
||||
}
|
||||
Program.PaymentRepository.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace PaymentLogs
|
||||
|
||||
try
|
||||
{
|
||||
User user = Program.UserRepository.GetUser(loginUser);
|
||||
User user = Program.UserRepository.Get(loginUser);
|
||||
string hash = StringUtils.SHA256_hash(passUser);
|
||||
if (hash.Equals(StringUtils.SecureStringToString(user.PasswordHash)))
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -17,3 +17,22 @@ D:\source\sql2\sql2\bin\Debug\MySql.Data.xml
|
||||
D:\source\sql2\sql2\obj\Debug\paymentL.CB2ACF0F.Up2Date
|
||||
D:\source\sql2\sql2\obj\Debug\PaymentLogs.exe
|
||||
D:\source\sql2\sql2\obj\Debug\PaymentLogs.pdb
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\paymentLogs.csproj.AssemblyReference.cache
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\PaymentLogs.DataForm.resources
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\PaymentLogs.LoginForm.resources
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\PaymentLogs.RegisterForm.resources
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\PaymentLogs.Properties.Resources.resources
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\paymentLogs.csproj.GenerateResource.cache
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\paymentLogs.csproj.CoreCompileInputs.cache
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\PaymentLogs.exe
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\PaymentLogs.pdb
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\PaymentLogs.exe.config
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\PaymentLogs.exe
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\PaymentLogs.pdb
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\MySql.Data.dll
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\System.Memory.dll
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\System.Threading.Tasks.Extensions.dll
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\System.Numerics.Vectors.dll
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\System.Buffers.dll
|
||||
D:\VS\PaymentLogs\sql2\bin\Debug\MySql.Data.xml
|
||||
D:\VS\PaymentLogs\sql2\obj\Debug\paymentL.CB2ACF0F.Up2Date
|
||||
Binary file not shown.
Reference in new issue
Block a user