/// <summary> /// Get all data to fill combo box /// </summary> /// <param name="error"></param> /// <returns></returns> public List <ModelNotifiedForOrders> GetAll_Orders(out string error) { OrdersGenericREST OrdersGenericREST = new OrdersGenericREST(wpfConfig); List <ModelNotifiedForOrders> modelNotifiedForOrders = OrdersGenericREST.GetAll <ModelNotifiedForOrders>(100, 0, out error); return(modelNotifiedForOrders); }
public void DeleteData(ModelNotifiedForOrders modelNotifiedForOrders, out string error) { OrdersGenericREST OrdersGenericREST = new OrdersGenericREST(wpfConfig); DeleteOrdersView deleteOrdersView = new DeleteOrdersView(); Cloner.CopyAllTo(typeof(ModelNotifiedForOrders), modelNotifiedForOrders, typeof(DeleteOrdersView), deleteOrdersView); OrdersGenericREST.Delete(deleteOrdersView, out error); }
public void AddData(ModelNotifiedForOrders modelNotifiedForOrders, out string error) { OrdersGenericREST OrdersGenericREST = new OrdersGenericREST(wpfConfig); CreateOrdersView createOrdersView = new CreateOrdersView(); Cloner.CopyAllTo(typeof(ModelNotifiedForOrders), modelNotifiedForOrders, typeof(CreateOrdersView), createOrdersView); OrdersGenericREST.Insert(createOrdersView, out error); }
public void SaveData(ModelNotifiedForOrders modelNotifiedForOrders, out string error) { OrdersGenericREST OrdersGenericREST = new OrdersGenericREST(wpfConfig); UpdateOrdersView updateOrdersView = new UpdateOrdersView(); Cloner.CopyAllTo(typeof(ModelNotifiedForOrders), modelNotifiedForOrders, typeof(UpdateOrdersView), updateOrdersView); OrdersGenericREST.Update(updateOrdersView, out error); }
public ModelNotifiedForOrders GetOrdersByID(int OrderID, out string error) { error = null; OrdersGenericREST OrdersGenericREST = new OrdersGenericREST(wpfConfig); GetOrdersView getOrdersView = OrdersGenericREST.GetByPK <GetOrdersView>(OrderID, out error)[0]; ModelNotifiedForOrders modelNotifiedForOrders = new ModelNotifiedForOrders(); Cloner.CopyAllTo(typeof(GetOrdersView), getOrdersView, typeof(ModelNotifiedForOrders), modelNotifiedForOrders); return(modelNotifiedForOrders); }
public List <ModelNotifiedForOrders> GetAllOrders(out string error) { OrdersGenericREST OrdersGenericREST = new OrdersGenericREST(wpfConfig); List <ModelNotifiedForOrders> modelNotifiedForOrders = OrdersGenericREST.GetAll <ModelNotifiedForOrders>(100, 0, out error); if (!string.IsNullOrEmpty(error)) { return(null); } //Initializing row status foreach (var item in modelNotifiedForOrders) { item.ItemChanged = false; item.NewItem = false; } return(modelNotifiedForOrders); }