правочка
This commit is contained in:
parent
aa94208637
commit
b36fe3771c
@ -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,
|
||||
};
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user