правочка
This commit is contained in:
parent
aa94208637
commit
b36fe3771c
@ -188,9 +188,9 @@ namespace SushiBarView
|
|||||||
TaskDate = DateTime.Now,
|
TaskDate = DateTime.Now,
|
||||||
Status = SushiBarDataModels.Enum.TaskStatus.Принят,
|
Status = SushiBarDataModels.Enum.TaskStatus.Принят,
|
||||||
FullPrice = CalcPrice(),
|
FullPrice = CalcPrice(),
|
||||||
CookId = comboBoxCook.SelectedIndex,
|
CookId = comboBoxCook.SelectedIndex+1,
|
||||||
BuyerId = comboBoxBuyer.SelectedIndex,
|
BuyerId = comboBoxBuyer.SelectedIndex+1,
|
||||||
PlaceId = comboBoxPlace.SelectedIndex,
|
PlaceId = comboBoxPlace.SelectedIndex+1,
|
||||||
TaskMenus = _taskMenu,
|
TaskMenus = _taskMenu,
|
||||||
MenuIds = ids,
|
MenuIds = ids,
|
||||||
};
|
};
|
||||||
|
@ -76,7 +76,7 @@ namespace SushiBarMongoDB.Implements
|
|||||||
|
|
||||||
var buyers = context.GetCollection<Buyer>("Buyers");
|
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);
|
var buyer = Buyer.Create(model);
|
||||||
buyers.InsertOne(buyer);
|
buyers.InsertOne(buyer);
|
||||||
|
@ -80,7 +80,7 @@ namespace SushiBarMongoDB.Implements
|
|||||||
|
|
||||||
var cooks = context.GetCollection<Cook>("Cooks");
|
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);
|
var cook = Cook.Create(model);
|
||||||
cooks.InsertOne(cook);
|
cooks.InsertOne(cook);
|
||||||
|
@ -80,7 +80,7 @@ namespace SushiBarMongoDB.Implements
|
|||||||
|
|
||||||
var menus = context.GetCollection<Menu>("Menus");
|
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);
|
var menu = Menu.Create(model);
|
||||||
menus.InsertOne(menu);
|
menus.InsertOne(menu);
|
||||||
|
@ -79,7 +79,7 @@ namespace SushiBarMongoDB.Implements
|
|||||||
|
|
||||||
var places = context.GetCollection<Place>("Places");
|
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);
|
var place = Place.Create(model);
|
||||||
places.InsertOne(place);
|
places.InsertOne(place);
|
||||||
|
@ -55,7 +55,7 @@ namespace SushiBarMongoDB.Implements
|
|||||||
|
|
||||||
var tasks = context.GetCollection<Task>("Tasks");
|
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);
|
var newTask = Task.Create(model);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user