public IHttpActionResult PostOperationUpdateWayOfPark([FromBody] OperationUpdateWayOfPark value) { try { IDSDirectory ids_wir = new IDSDirectory(service.WebAPI_IDS); int result = ids_wir.OperationUpdateWayOfPark(value.way, value.user); return(Ok(result)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IHttpActionResult GetCorrectNumCar(int num) { try { IDSDirectory ids_dir = new IDSDirectory(service.WebAPI_IDS); bool correct = ids_dir.IsCorrectNumCar(num); return(Ok(correct)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IHttpActionResult PostOperationUpdateWagons([FromBody] OperationUpdateWagons value) { try { IDSDirectory ids_dir = new IDSDirectory(service.WebAPI_IDS); OperationResultWagon result = ids_dir.OperationUpdateWagons(value.list_nums, value.edit_operator, value.id_operator, value.start_rent, value.edit_limiting, value.id_limiting, value.user); return(Ok(result)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IHttpActionResult PostOperationUpdateWagons([FromBody] OperationUpdateWagon value) { try { IDSDirectory ids_dir = new IDSDirectory(service.WebAPI_IDS); OperationResultWagon result = ids_dir.OperationUpdateWagon(value.num, value.id_countrys, value.id_genus, value.gruzp, value.tara, value.kol_os, value.usl_tip, value.date_rem_vag, value.id_type_ownership, value.sign, value.factory_number, value.inventory_number, value.year_built, value.exit_ban, value.id_operator, value.rent_start, value.id_limiting, value.user); return(Ok(result)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IHttpActionResult PostOperationDown1PositionParkOfStation([FromBody] OperationSelectParkOfStation value) { try { IDSDirectory ids_wir = new IDSDirectory(service.WebAPI_IDS); int result = ids_wir.OperationDown1PositionParkOfStation(value.id_station, value.id_park, value.user); return(Ok(result)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IHttpActionResult POSTWagonOfNumSpecification(int num, [FromBody] WagonSpecification specification) { try { string user = base.User.Identity.Name; IDSDirectory ids_dir = new IDSDirectory(service.WebAPI_IDS); //ids_dir.Transfer_new_car_of_kis = false; // TODO: !! ОТКЛЮЧИЛ Признак создавать вагоны в справочнике ИДС по данным КИС и ИРЫ если вагон новый //TODO: ЗАМЕНА //Directory_Wagons car = ids_dir.GetDirectory_WagonsOfNum(num, specification.adm, (specification.rod == null ? null : (int?)int.Parse(specification.rod)), specification.kol_os, specification.usl_tip, user).GetDirectory_Wagons_Directory_WagonsRent(); Directory_Wagons car = ids_dir.OperationCreateUpdateWagon(num, specification.adm, (specification.rod == null ? null : (int?)int.Parse(specification.rod)), specification.kol_os, specification.usl_tip, user).GetDirectory_Wagons_Directory_WagonsRent(); return(Ok(car.GetDirectory_Wagons_Directory_WagonsRent())); } catch (Exception e) { return(BadRequest(e.Message)); } }
public void IDSDirectory_OperationUp1PositionWayOfPark() { IDSDirectory ids = new IDSDirectory(service.Test); EFDbContext context = new EFDbContext(); int res = ids.OperationUp1PositionWayOfPark(ref context, 595, "test_user"); }
public void IDSDirectory_IsCorrectNumCar() { IDSDirectory ids = new IDSDirectory(service.Test); bool res = ids.IsCorrectNumCar(12345678); }
// Тест получение текущего вагона public void IDSDirectory_GetCurrentDirectory_CarsOfNum() { IDSDirectory ids = new IDSDirectory(service.Test); //Directory_Wagons res = ids.GetDirectory_WagonsOfNum(50030584, 22,60, 4, "", true, @"EUROPE\ealevchenko", false); }
public void IDSDirectory_GetID_Directory_StationOfCodeCS() { IDSDirectory ids = new IDSDirectory(service.Test); int res = ids.GetID_Directory_StationOfCodeCS(873009, true); }