точно готово 2
This commit is contained in:
parent
f73fd04201
commit
08c9f68699
@ -47,7 +47,7 @@ namespace ProjectSession.Forms
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(textBoxName.Text) || comboBoxType.SelectedIndex < 1)
|
if (string.IsNullOrWhiteSpace(textBoxName.Text) || comboBoxType.SelectedIndex < 0)
|
||||||
{
|
{
|
||||||
throw new Exception("Имеются незаполненныеполя");
|
throw new Exception("Имеются незаполненныеполя");
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ namespace ProjectSession.Forms
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(textBoxName.Text) || comboBoxType.SelectedIndex<1)
|
if (string.IsNullOrWhiteSpace(textBoxName.Text) || comboBoxType.SelectedIndex<0)
|
||||||
{
|
{
|
||||||
throw new Exception("Имеются незаполненныеполя");
|
throw new Exception("Имеются незаполненныеполя");
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ namespace ProjectSession.Forms
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(textBoxStudentFirstName.Text) || string.IsNullOrWhiteSpace(textBoxStudentLastName.Text) || comboBoxStudentGroup.SelectedIndex < 0)
|
if (string.IsNullOrWhiteSpace(textBoxStudentFirstName.Text) || string.IsNullOrWhiteSpace(textBoxStudentLastName.Text) || comboBoxStudentGroup.SelectedIndex < 0 || checkedListBoxStudentStatus.SelectedIndex<0)
|
||||||
{
|
{
|
||||||
throw new Exception("Имеются незаполненныеполя");
|
throw new Exception("Имеются незаполненныеполя");
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ namespace ProjectSession.Forms
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(textBoxTeacherFirstName.Text) || string.IsNullOrWhiteSpace(textBoxTeacherLastName.Text)
|
if (string.IsNullOrWhiteSpace(textBoxTeacherFirstName.Text) || string.IsNullOrWhiteSpace(textBoxTeacherLastName.Text)
|
||||||
|| comboBoxTeacherPost.SelectedIndex < 1|| dataGridViewDisciplines.RowCount < 1 )
|
|| comboBoxTeacherPost.SelectedIndex < 0|| dataGridViewDisciplines.RowCount < 1 )
|
||||||
{
|
{
|
||||||
throw new Exception("Имеются незаполненныеполя");
|
throw new Exception("Имеются незаполненныеполя");
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace ProjectSession.Repositories
|
||||||
|
{
|
||||||
|
public interface IConnectionString
|
||||||
|
{
|
||||||
|
public string ConnectionString { get;}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
namespace ProjectSession.Repositories
|
||||||
|
{
|
||||||
|
public class ConnectionString : IConnectionString
|
||||||
|
{
|
||||||
|
string IConnectionString.ConnectionString => "Host=localhost;Port=5432;Username=postgres;Password=postgres;Database=otp";
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,5 @@
|
|||||||
using ProjectSession.Entities;
|
using ProjectSession.Entities;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace ProjectSession.Repositories.Implementations
|
namespace ProjectSession.Repositories.Implementations
|
||||||
{
|
{
|
||||||
|
15
ProjectSession/ProjectSession/appsettings.json
Normal file
15
ProjectSession/ProjectSession/appsettings.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"Serilog": {
|
||||||
|
"Using": [ "Serilog.Sinks.File" ],
|
||||||
|
"MinimumLevel": "Debug",
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "Logs/Session_log.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user