написала на компе надо проверить на ноуте

This commit is contained in:
dasha 2023-05-10 22:47:14 +04:00
parent 7c0760fdba
commit 80afc49285

View File

@ -5,6 +5,8 @@ using BeautySaloonContracts.ViewModels;
using BeautySaloonDatabaseImplement;
using BeautySaloonDataModels;
using BeautySaloonNoSQLDatabaseImplement;
using MongoDB.Bson;
using MongoDB.Driver;
using System.Diagnostics;
using System.Text;
@ -229,7 +231,22 @@ namespace BeautySaloonView
Sum = o.Sum
}).ToList();
}*/
var result = _OLogic.ReadList(null)?.OrderByDescending(x => x.Date).OrderBy(x => x.Sum).ToList();
//var result = _OLogic.ReadList(null)?.OrderByDescending(x => x.Date).OrderBy(x => x.Sum).ToList();
var source = MongoDBContext.GetInstance();
var users = (from o in source.Orders.AsQueryable()
join c in source.Clients.AsQueryable() on o.ClientId equals c.Id
join em in source.Employees.AsQueryable() on o.EmployeeId equals em.Id
where em.PositionName == "Продавец"
orderby o.Date descending, o.Sum descending
select new
{
Id = o.Id,
Client = c.Name + ' ' + c.Surname + ' ' + c.Patronymic,
Seller = em.Name + ' ' + em.Surname + ' ' + em.Patronymic,
Position = em.PositionName,
Date = o.Date,
Sum = o.Sum
}).ToList();
stopwatch3.Stop();
TimeSpan ts3 = stopwatch3.Elapsed;
string elapsedTime3 = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",