|
@@ -188,13 +188,17 @@ namespace ImpulseVision
|
|
|
{
|
|
|
while (Res.Read())
|
|
|
{
|
|
|
- FaceItem = new FaceData();
|
|
|
- FaceItem.FaceImage = new Image<Gray, byte>(Application.StartupPath +"\\"+ Res["Picture"].ToString());
|
|
|
- FaceItem.PersonName = Res["Firstname"].ToString();
|
|
|
- FaceItem.LastName = Res["Lastname"].ToString();
|
|
|
- FaceItem.Patronymic = Res["Patronymic"].ToString();
|
|
|
- FaceItem.UserID = Res["ID"].ToString();
|
|
|
- FaceList.Add(FaceItem);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ FaceItem = new FaceData();
|
|
|
+ FaceItem.FaceImage = new Image<Gray, byte>(Application.StartupPath + "\\" + Res["Picture"].ToString());
|
|
|
+ FaceItem.PersonName = Res["Firstname"].ToString();
|
|
|
+ FaceItem.LastName = Res["Lastname"].ToString();
|
|
|
+ FaceItem.Patronymic = Res["Patronymic"].ToString();
|
|
|
+ FaceItem.UserID = Res["ID"].ToString();
|
|
|
+ FaceList.Add(FaceItem);
|
|
|
+ }
|
|
|
+ catch { }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -545,6 +549,10 @@ where ut.[Date] = cast(GETDATE() as date)";
|
|
|
try
|
|
|
{
|
|
|
Image<Bgr, byte> Img = BgrFrame.Copy();
|
|
|
+ if(!Directory.Exists(Application.StartupPath+@"\Source\log"))
|
|
|
+ {
|
|
|
+ Directory.CreateDirectory(Application.StartupPath + @"\Source\log");
|
|
|
+ }
|
|
|
string PathLog = Application.StartupPath + $"\\Source\\log\\{"User_" + CurrentUserID + "_" + DateTime.Now.ToString("HHmmss") + "_" + DateTime.Now.ToString("dd.MM.yyyy") + "_" + Guid.NewGuid().ToString().Substring(0, 4)}.bmp";
|
|
|
Img.Save(PathLog);
|
|
|
}
|