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