Исправление формыы работы с проектами
This commit is contained in:
parent
2bb556bc3f
commit
c5b53aac84
@ -88,7 +88,7 @@ namespace Accounting_Time_It_Company.Forms
|
||||
private Product CreateProduct(int id)
|
||||
{
|
||||
TypeProduct type = TypeProduct.None;
|
||||
foreach (var elem in Enum.GetValues( typeof(TypeProduct)))
|
||||
foreach (var elem in checkedListBoxTypeProduct.CheckedItems)
|
||||
{
|
||||
type |= (TypeProduct)elem;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class ProductRepositories : IProductRepositories
|
||||
connection.Open();
|
||||
var querySelect = @"
|
||||
SELECT * FROM Product
|
||||
WHERE [Id]=@id";
|
||||
WHERE Id=@id";
|
||||
var product = connection.QueryFirst<Product>(querySelect, new { id });
|
||||
_logger.LogDebug("Найденный объект: {json}", JsonConvert.SerializeObject(product));
|
||||
return product;
|
||||
|
@ -30,7 +30,7 @@ public class TypeJobRepositories : ITypeJobRepositories
|
||||
using var transaction = connection.BeginTransaction();
|
||||
var queryInsert = @"
|
||||
INSERT INTO TypeJob
|
||||
VALUES (DEFAULT, @ProductId, @Description, @AllowanceForJob, @Date, @WorkTimesDevelop, @WorkTimesManager);
|
||||
VALUES (DEFAULT, @ProductId, @Description, @AllowanceForJob, @Date);
|
||||
SELECT MAX(Id) FROM TypeJob";
|
||||
var typeJobId = connection.QueryFirst<int>(queryInsert, typeJob, transaction);
|
||||
var querySubInsert = @"
|
||||
|
Loading…
x
Reference in New Issue
Block a user