Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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);
        }