public void OrderDetailsTest() { DALDB db = new DALDB(); int n = 10248; Assert.AreEqual(true, db.OrderDetails(n)); }
public void EmptyTablegOrderDetailsTest() { DALDB db = new DALDB(); int n = 10; Assert.AreEqual(true, db.OrderDetails(n)); }
/// <summary> /// Детали заказа для обновления данных /// </summary> /// <param name="OrderID"></param> public OrderDetailsDTO OrderDetails(int OrderID) { try { var o = Data.OrderDetails(OrderID); OrderDetailsDTO order = new OrderDetailsDTO(); order.OrderID = o.OrderID; order.CustomerID = o.CustomerID; order.EmployeeID = o.EmployeeID; order.OrderDate = o.OrderDate; order.RequiredDate = o.RequiredDate; order.ShippedDate = o.ShippedDate; order.ShipVia = o.ShipVia; order.Freight = o.Freight; order.ShipName = o.ShipName; order.ShipAddress = o.ShipAddress; order.ShipCity = o.ShipCity; order.ShipRegion = o.ShipRegion; order.ShipPostalCode = o.ShipPostalCode; order.ShipCountry = o.ShipCountry; order.OrderStatus = o.OrderStatus.ToString(); order.ProductID = o.ProductID; order.ProductName = o.ProductName; order.Quantity = o.Quantity; order.UnitPrice = o.UnitPrice; order.Discount = o.Discount; return(order); } catch (ArgumentException ex) { throw new ValidationException(ex.Message, ex.ParamName); } }