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); }
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); }
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); }
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); }
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); }
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); }
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); }