Ejemplo n.º 1
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.º 2
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.º 3
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.º 4
0
        public void DeleteData(ModelNotifiedForOrders modelNotifiedForOrders, out string error)
        {
            OrdersBsn  bsn    = new OrdersBsn(wpfConfig);
            OrdersInfo dbItem = new OrdersInfo();

            Cloner.CopyAllTo(typeof(ModelNotifiedForOrders), modelNotifiedForOrders, typeof(OrdersInfo), dbItem);
            bsn.DeleteByID(dbItem, 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 ModelNotifiedForOrders GetOrdersByID(int OrderID, out string error)
        {
            error = null;
            OrdersBsn              bsn    = new OrdersBsn(wpfConfig);
            OrdersInfo             dbItem = bsn.GetValueByID(OrderID);
            ModelNotifiedForOrders item   = new ModelNotifiedForOrders();

            Cloner.CopyAllTo(typeof(OrdersInfo), dbItem, typeof(ModelNotifiedForOrders), item);
            return(item);
        }
Ejemplo n.º 7
0
        public void AddData(ModelNotifiedForOrders modelNotifiedForOrders, out string error)
        {
            OrdersBsn  bsn    = new OrdersBsn(wpfConfig);
            OrdersInfo dbItem = new OrdersInfo();

            Cloner.CopyAllTo(typeof(ModelNotifiedForOrders), modelNotifiedForOrders, typeof(OrdersInfo), dbItem);
            bsn.InsertOne(dbItem, out error);
            modelNotifiedForOrders.NewItem = false;
            Cloner.CopyAllTo(typeof(OrdersInfo), dbItem, typeof(ModelNotifiedForOrders), modelNotifiedForOrders);
        }