lab5
This commit is contained in:
parent
d3c3940083
commit
4e2aacec5d
@ -94,7 +94,14 @@ namespace SoftwareInstallationView
|
||||
{
|
||||
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)
|
||||
@ -123,7 +130,14 @@ namespace SoftwareInstallationView
|
||||
{
|
||||
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)
|
||||
@ -152,7 +166,14 @@ namespace SoftwareInstallationView
|
||||
{
|
||||
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)
|
||||
|
@ -12,8 +12,8 @@ using SoftwareInstallationDataBaseImplement;
|
||||
namespace SoftwareInstallationDataBaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(SoftwareInstallationDataBase))]
|
||||
[Migration("20230326141801_CreateDb")]
|
||||
partial class CreateDb
|
||||
[Migration("20230327190743_InitCr")]
|
||||
partial class InitCr
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace SoftwareInstallationDataBaseImplement.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CreateDb : Migration
|
||||
public partial class InitCr : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
@ -9,7 +9,7 @@ namespace SoftwareInstallationDataBaseImplement
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseSqlServer(@"Data Source=ANNZHIMOL\SQLEXPRESS;Initial Catalog=SoftwareInstallationDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
optionsBuilder.UseSqlServer(@"Data Source=COMP-AVZH\SQLEXPRESS;Initial Catalog=SoftwareInstallationDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user