/// <summary> /// Get all data to fill combo box /// </summary> /// <param name="error"></param> /// <returns></returns> public List <ModelNotifiedForCategories> GetAll_Categories(out string error) { CategoriesGenericREST CategoriesGenericREST = new CategoriesGenericREST(wpfConfig); List <ModelNotifiedForCategories> modelNotifiedForCategories = CategoriesGenericREST.GetAll <ModelNotifiedForCategories>(100, 0, out error); return(modelNotifiedForCategories); }
public void DeleteData(ModelNotifiedForCategories modelNotifiedForCategories, out string error) { CategoriesGenericREST CategoriesGenericREST = new CategoriesGenericREST(wpfConfig); DeleteCategoriesView deleteCategoriesView = new DeleteCategoriesView(); Cloner.CopyAllTo(typeof(ModelNotifiedForCategories), modelNotifiedForCategories, typeof(DeleteCategoriesView), deleteCategoriesView); CategoriesGenericREST.Delete(deleteCategoriesView, out error); }
public void AddData(ModelNotifiedForCategories modelNotifiedForCategories, out string error) { CategoriesGenericREST CategoriesGenericREST = new CategoriesGenericREST(wpfConfig); CreateCategoriesView createCategoriesView = new CreateCategoriesView(); Cloner.CopyAllTo(typeof(ModelNotifiedForCategories), modelNotifiedForCategories, typeof(CreateCategoriesView), createCategoriesView); CategoriesGenericREST.Insert(createCategoriesView, out error); }
public void SaveData(ModelNotifiedForCategories modelNotifiedForCategories, out string error) { CategoriesGenericREST CategoriesGenericREST = new CategoriesGenericREST(wpfConfig); UpdateCategoriesView updateCategoriesView = new UpdateCategoriesView(); Cloner.CopyAllTo(typeof(ModelNotifiedForCategories), modelNotifiedForCategories, typeof(UpdateCategoriesView), updateCategoriesView); CategoriesGenericREST.Update(updateCategoriesView, out error); }
public ModelNotifiedForCategories GetCategoriesByID(int CategoryID, out string error) { error = null; CategoriesGenericREST CategoriesGenericREST = new CategoriesGenericREST(wpfConfig); GetCategoriesView getCategoriesView = CategoriesGenericREST.GetByPK <GetCategoriesView>(CategoryID, out error)[0]; ModelNotifiedForCategories modelNotifiedForCategories = new ModelNotifiedForCategories(); Cloner.CopyAllTo(typeof(GetCategoriesView), getCategoriesView, typeof(ModelNotifiedForCategories), modelNotifiedForCategories); return(modelNotifiedForCategories); }
public List <ModelNotifiedForCategories> GetAllCategories(out string error) { CategoriesGenericREST CategoriesGenericREST = new CategoriesGenericREST(wpfConfig); List <ModelNotifiedForCategories> modelNotifiedForCategories = CategoriesGenericREST.GetAll <ModelNotifiedForCategories>(100, 0, out error); if (!string.IsNullOrEmpty(error)) { return(null); } //Initializing row status foreach (var item in modelNotifiedForCategories) { item.ItemChanged = false; item.NewItem = false; } return(modelNotifiedForCategories); }