/// <summary> /// Get all data to fill combo box /// </summary> /// <param name="error"></param> /// <returns></returns> public List <ModelNotifiedForProducts> GetAll_Products(out string error) { ProductsGenericREST ProductsGenericREST = new ProductsGenericREST(wpfConfig); List <ModelNotifiedForProducts> modelNotifiedForProducts = ProductsGenericREST.GetAll <ModelNotifiedForProducts>(100, 0, out error); return(modelNotifiedForProducts); }
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 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 List <ModelNotifiedForProducts> GetAllProducts(out string error) { ProductsGenericREST ProductsGenericREST = new ProductsGenericREST(wpfConfig); List <ModelNotifiedForProducts> modelNotifiedForProducts = ProductsGenericREST.GetAll <ModelNotifiedForProducts>(100, 0, out error); if (!string.IsNullOrEmpty(error)) { return(null); } //Initializing row status foreach (var item in modelNotifiedForProducts) { item.ItemChanged = false; item.NewItem = false; } return(modelNotifiedForProducts); }