-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into Alihan2
- Loading branch information
Showing
43 changed files
with
4,046 additions
and
729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
using CargoHub.Models; | ||
using CargoHub.Services; | ||
using CargoHub.Utilities; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.EntityFrameworkCore.Metadata.Internal; | ||
// using CargoHub.Models; | ||
// using CargoHub.Services; | ||
// using CargoHub.Utilities; | ||
// using Microsoft.AspNetCore.Mvc; | ||
// using Microsoft.EntityFrameworkCore.Metadata.Internal; | ||
|
||
namespace CargoHub.Controllers | ||
{ | ||
[Route("api/v2/[Controller]")] | ||
public class ClassificationController(ClassificationService service, ErrorHandler handler) : BaseController<Classification>(service, handler) | ||
{ | ||
[HttpPut("Order")] | ||
public async Task<IActionResult> AssignClassificationToOrder([FromQuery] int OrderId, [FromQuery] int ClassificationId) | ||
{ | ||
var SuccessfullyAssigned = await service.AssignClassificationToEntity<Order>(OrderId, ClassificationId); | ||
return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
} | ||
// namespace CargoHub.Controllers | ||
// { | ||
// [Route("api/v2/[Controller]")] | ||
// public class ClassificationController(ClassificationService service, ErrorHandler handler) : BaseController<Classification>(service, handler) | ||
// { | ||
// [HttpPut("Order")] | ||
// public async Task<IActionResult> AssignClassificationToOrder([FromQuery] int OrderId, [FromQuery] int ClassificationId) | ||
// { | ||
// var SuccessfullyAssigned = await service.AssignClassificationToEntity<Order>(OrderId, ClassificationId); | ||
// return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
// } | ||
|
||
[HttpPut("Shipment")] | ||
public async Task<IActionResult> AssignClassificationToShipment([FromQuery] int ShipmentId, [FromQuery] int ClassificationId) | ||
{ | ||
var SuccessfullyAssigned = await service.AssignClassificationToEntity<Shipment>(ShipmentId, ClassificationId); | ||
return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
} | ||
// [HttpPut("Shipment")] | ||
// public async Task<IActionResult> AssignClassificationToShipment([FromQuery] int ShipmentId, [FromQuery] int ClassificationId) | ||
// { | ||
// var SuccessfullyAssigned = await service.AssignClassificationToEntity<Shipment>(ShipmentId, ClassificationId); | ||
// return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
// } | ||
|
||
[HttpPut("Warehouse")] | ||
public async Task<IActionResult> AssignClassificationToWarehouse([FromQuery] int WarehouseId, [FromQuery] int ClassificationId) | ||
{ | ||
var SuccessfullyAssigned = await service.AssignClassificationToEntity<Warehouse>(WarehouseId, ClassificationId); | ||
return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
} | ||
[HttpPut("Location")] | ||
public async Task<IActionResult> AssignClassificationToLocation([FromQuery] int LocationId, [FromBody] int ClassificationId) | ||
{ | ||
// [HttpPut("Warehouse")] | ||
// public async Task<IActionResult> AssignClassificationToWarehouse([FromQuery] int WarehouseId, [FromQuery] int ClassificationId) | ||
// { | ||
// var SuccessfullyAssigned = await service.AssignClassificationToEntity<Warehouse>(WarehouseId, ClassificationId); | ||
// return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
// } | ||
// [HttpPut("Location")] | ||
// public async Task<IActionResult> AssignClassificationToLocation([FromQuery] int LocationId, [FromBody] int ClassificationId) | ||
// { | ||
|
||
var SuccessfullyAssigned = await service.AssignClassificationToEntity<Location>(LocationId, ClassificationId); | ||
return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
} | ||
[HttpPut("Transfer")] | ||
public async Task<IActionResult> AssignClassificationToTransfer([FromQuery] int LocationId, [FromQuery] int ClassificationId) | ||
{ | ||
// var SuccessfullyAssigned = await service.AssignClassificationToEntity<Location>(LocationId, ClassificationId); | ||
// return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
// } | ||
// [HttpPut("Transfer")] | ||
// public async Task<IActionResult> AssignClassificationToTransfer([FromQuery] int LocationId, [FromQuery] int ClassificationId) | ||
// { | ||
|
||
var SuccessfullyAssigned = await service.AssignClassificationToEntity<Location>(LocationId, ClassificationId); | ||
return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
} | ||
[HttpPut("Supplier")] | ||
public async Task<IActionResult> AssignClassificationToSupplier([FromQuery] int SupplierId, [FromQuery] int ClassificationId) | ||
{ | ||
// var SuccessfullyAssigned = await service.AssignClassificationToEntity<Location>(LocationId, ClassificationId); | ||
// return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
// } | ||
// [HttpPut("Supplier")] | ||
// public async Task<IActionResult> AssignClassificationToSupplier([FromQuery] int SupplierId, [FromQuery] int ClassificationId) | ||
// { | ||
|
||
var SuccessfullyAssigned = await service.AssignClassificationToEntity<Supplier>(SupplierId, ClassificationId); | ||
return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
} | ||
[HttpPut("Item")] | ||
public async Task<IActionResult> AssignClassificationToItem([FromQuery] int ItemId, [FromQuery] int ClassificationId) | ||
{ | ||
// var SuccessfullyAssigned = await service.AssignClassificationToEntity<Supplier>(SupplierId, ClassificationId); | ||
// return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
// } | ||
// [HttpPut("Item")] | ||
// public async Task<IActionResult> AssignClassificationToItem([FromQuery] int ItemId, [FromQuery] int ClassificationId) | ||
// { | ||
|
||
var SuccessfullyAssigned = await service.AssignClassificationToEntity<Item>(ItemId, ClassificationId); | ||
return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
} | ||
} | ||
} | ||
// var SuccessfullyAssigned = await service.AssignClassificationToEntity<Item>(ItemId, ClassificationId); | ||
// return SuccessfullyAssigned ? Ok() : BadRequest(); | ||
// } | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
File,DateOfTransfer,RowsChanged,TransferTime,Error | ||
../data\clients.json,18-01-25,9820,00:00:02, | ||
../data\inventories.json,18-01-25,11720,00:00:04, | ||
../data\items.json,18-01-25,11720,00:00:08, | ||
../data\item_groups.json,18-01-25,100,00:00:08, | ||
../data\item_lines.json,18-01-25,97,00:00:08, | ||
../data\item_types.json,18-01-25,100,00:00:08, | ||
../data\locations.json,18-01-25,34533,00:00:13, | ||
../data\orders.json,18-01-25,0,00:00:14,Error: The entity type 'JsonOrder' was not found. Ensure that the entity type has been added to the model. | ||
../data\shipments.json,18-01-25,0,00:00:14,Error: The entity type 'JsonShipment' was not found. Ensure that the entity type has been added to the model. | ||
../data\suppliers.json,18-01-25,497,00:00:14, | ||
../data\transfers.json,18-01-25,119240,00:00:39, | ||
../data\warehouses.json,18-01-25,58,00:00:39, |
Oops, something went wrong.