правочка

This commit is contained in:
Максим Яковлев 2024-05-08 08:59:44 +04:00
parent aa94208637
commit b36fe3771c
6 changed files with 8 additions and 8 deletions

View File

@ -188,9 +188,9 @@ namespace SushiBarView
TaskDate = DateTime.Now,
Status = SushiBarDataModels.Enum.TaskStatus.Принят,
FullPrice = CalcPrice(),
CookId = comboBoxCook.SelectedIndex,
BuyerId = comboBoxBuyer.SelectedIndex,
PlaceId = comboBoxPlace.SelectedIndex,
CookId = comboBoxCook.SelectedIndex+1,
BuyerId = comboBoxBuyer.SelectedIndex+1,
PlaceId = comboBoxPlace.SelectedIndex+1,
TaskMenus = _taskMenu,
MenuIds = ids,
};

View File

@ -76,7 +76,7 @@ namespace SushiBarMongoDB.Implements
var buyers = context.GetCollection<Buyer>("Buyers");
model.Id = (int)buyers.CountDocuments(FilterDefinition<Buyer>.Empty);
model.Id = (int)buyers.CountDocuments(FilterDefinition<Buyer>.Empty)+1;
var buyer = Buyer.Create(model);
buyers.InsertOne(buyer);

View File

@ -80,7 +80,7 @@ namespace SushiBarMongoDB.Implements
var cooks = context.GetCollection<Cook>("Cooks");
model.Id = (int)cooks.CountDocuments(FilterDefinition<Cook>.Empty);
model.Id = (int)cooks.CountDocuments(FilterDefinition<Cook>.Empty) + 1;
var cook = Cook.Create(model);
cooks.InsertOne(cook);

View File

@ -80,7 +80,7 @@ namespace SushiBarMongoDB.Implements
var menus = context.GetCollection<Menu>("Menus");
model.Id = (int)menus.CountDocuments(FilterDefinition<Menu>.Empty);
model.Id = (int)menus.CountDocuments(FilterDefinition<Menu>.Empty) + 1;
var menu = Menu.Create(model);
menus.InsertOne(menu);

View File

@ -79,7 +79,7 @@ namespace SushiBarMongoDB.Implements
var places = context.GetCollection<Place>("Places");
model.Id = (int)places.CountDocuments(FilterDefinition<Place>.Empty);
model.Id = (int)places.CountDocuments(FilterDefinition<Place>.Empty) + 1;
var place = Place.Create(model);
places.InsertOne(place);

View File

@ -55,7 +55,7 @@ namespace SushiBarMongoDB.Implements
var tasks = context.GetCollection<Task>("Tasks");
model.Id = (int)tasks.CountDocuments(FilterDefinition<Task>.Empty);
model.Id = (int)tasks.CountDocuments(FilterDefinition<Task>.Empty) + 1;
var newTask = Task.Create(model);