lab5 hard
This commit is contained in:
commit
c3bd61ffc8
@ -94,7 +94,14 @@ namespace SoftwareInstallationView
|
|||||||
{
|
{
|
||||||
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel
|
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = id
|
Id = id,
|
||||||
|
ClientId= Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ClientId"].Value),
|
||||||
|
PackageId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["PackageId"].Value),
|
||||||
|
PackageName = DataGridView.SelectedRows[0].Cells["PackageName"].Value.ToString(),
|
||||||
|
Status = Enum.Parse<OrderStatus>(DataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
||||||
|
Count = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["Count"].Value),
|
||||||
|
Sum = double.Parse(DataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
||||||
|
DateCreate = DateTime.Parse(DataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
@ -123,7 +130,14 @@ namespace SoftwareInstallationView
|
|||||||
{
|
{
|
||||||
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel
|
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = id
|
Id = id,
|
||||||
|
ClientId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ClientId"].Value),
|
||||||
|
PackageId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["PackageId"].Value),
|
||||||
|
PackageName = DataGridView.SelectedRows[0].Cells["PackageName"].Value.ToString(),
|
||||||
|
Status = Enum.Parse<OrderStatus>(DataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
||||||
|
Count = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["Count"].Value),
|
||||||
|
Sum = double.Parse(DataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
||||||
|
DateCreate = DateTime.Parse(DataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
@ -152,7 +166,14 @@ namespace SoftwareInstallationView
|
|||||||
{
|
{
|
||||||
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel
|
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = id
|
Id = id,
|
||||||
|
ClientId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ClientId"].Value),
|
||||||
|
PackageId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["PackageId"].Value),
|
||||||
|
PackageName = DataGridView.SelectedRows[0].Cells["PackageName"].Value.ToString(),
|
||||||
|
Status = Enum.Parse<OrderStatus>(DataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
||||||
|
Count = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["Count"].Value),
|
||||||
|
Sum = double.Parse(DataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
||||||
|
DateCreate = DateTime.Parse(DataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
|
@ -12,8 +12,8 @@ using SoftwareInstallationDataBaseImplement;
|
|||||||
namespace SoftwareInstallationDataBaseImplement.Migrations
|
namespace SoftwareInstallationDataBaseImplement.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(SoftwareInstallationDataBase))]
|
[DbContext(typeof(SoftwareInstallationDataBase))]
|
||||||
[Migration("20230326141801_CreateDb")]
|
[Migration("20230327190743_InitCr")]
|
||||||
partial class CreateDb
|
partial class InitCr
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
namespace SoftwareInstallationDataBaseImplement.Migrations
|
namespace SoftwareInstallationDataBaseImplement.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class CreateDb : Migration
|
public partial class InitCr : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
Loading…
x
Reference in New Issue
Block a user