示例#1
0
        public void DeleteData(ModelNotifiedForProducts modelNotifiedForProducts, out string error)
        {
            ProductsGenericREST ProductsGenericREST = new ProductsGenericREST(wpfConfig);
            DeleteProductsView  deleteProductsView  = new DeleteProductsView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForProducts), modelNotifiedForProducts, typeof(DeleteProductsView), deleteProductsView);
            ProductsGenericREST.Delete(deleteProductsView, out error);
        }
示例#2
0
        public void AddData(ModelNotifiedForProducts modelNotifiedForProducts, out string error)
        {
            ProductsGenericREST ProductsGenericREST = new ProductsGenericREST(wpfConfig);
            CreateProductsView  createProductsView  = new CreateProductsView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForProducts), modelNotifiedForProducts, typeof(CreateProductsView), createProductsView);
            ProductsGenericREST.Insert(createProductsView, out error);
        }
示例#3
0
        public void SaveData(ModelNotifiedForProducts modelNotifiedForProducts, out string error)
        {
            ProductsGenericREST ProductsGenericREST = new ProductsGenericREST(wpfConfig);
            UpdateProductsView  updateProductsView  = new UpdateProductsView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForProducts), modelNotifiedForProducts, typeof(UpdateProductsView), updateProductsView);
            ProductsGenericREST.Update(updateProductsView, out error);
        }
示例#4
0
        public void DeleteData(ModelNotifiedForProducts modelNotifiedForProducts, out string error)
        {
            ProductsBsn  bsn    = new ProductsBsn(wpfConfig);
            ProductsInfo dbItem = new ProductsInfo();

            Cloner.CopyAllTo(typeof(ModelNotifiedForProducts), modelNotifiedForProducts, typeof(ProductsInfo), dbItem);
            bsn.DeleteByID(dbItem, out error);
        }
示例#5
0
        public ModelNotifiedForProducts GetProductsByID(int ProductID, out string error)
        {
            error = null;
            ProductsGenericREST      ProductsGenericREST      = new ProductsGenericREST(wpfConfig);
            GetProductsView          getProductsView          = ProductsGenericREST.GetByPK <GetProductsView>(ProductID, out error)[0];
            ModelNotifiedForProducts modelNotifiedForProducts = new ModelNotifiedForProducts();

            Cloner.CopyAllTo(typeof(GetProductsView), getProductsView, typeof(ModelNotifiedForProducts), modelNotifiedForProducts);
            return(modelNotifiedForProducts);
        }
示例#6
0
        public ModelNotifiedForProducts GetProductsByID(int ProductID, out string error)
        {
            error = null;
            ProductsBsn              bsn    = new ProductsBsn(wpfConfig);
            ProductsInfo             dbItem = bsn.GetValueByID(ProductID);
            ModelNotifiedForProducts item   = new ModelNotifiedForProducts();

            Cloner.CopyAllTo(typeof(ProductsInfo), dbItem, typeof(ModelNotifiedForProducts), item);
            return(item);
        }
示例#7
0
        public void AddData(ModelNotifiedForProducts modelNotifiedForProducts, out string error)
        {
            ProductsBsn  bsn    = new ProductsBsn(wpfConfig);
            ProductsInfo dbItem = new ProductsInfo();

            Cloner.CopyAllTo(typeof(ModelNotifiedForProducts), modelNotifiedForProducts, typeof(ProductsInfo), dbItem);
            bsn.InsertOne(dbItem, out error);
            modelNotifiedForProducts.NewItem = false;
            Cloner.CopyAllTo(typeof(ProductsInfo), dbItem, typeof(ModelNotifiedForProducts), modelNotifiedForProducts);
        }