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 DeleteData(ModelNotifiedForCategories modelNotifiedForCategories, out string error) { CategoriesBsn bsn = new CategoriesBsn(wpfConfig); CategoriesInfo dbItem = new CategoriesInfo(); Cloner.CopyAllTo(typeof(ModelNotifiedForCategories), modelNotifiedForCategories, typeof(CategoriesInfo), dbItem); bsn.DeleteByID(dbItem, 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 void AddData(ModelNotifiedForCategories modelNotifiedForCategories, out string error) { CategoriesBsn bsn = new CategoriesBsn(wpfConfig); CategoriesInfo dbItem = new CategoriesInfo(); Cloner.CopyAllTo(typeof(ModelNotifiedForCategories), modelNotifiedForCategories, typeof(CategoriesInfo), dbItem); bsn.InsertOne(dbItem, out error); modelNotifiedForCategories.NewItem = false; Cloner.CopyAllTo(typeof(CategoriesInfo), dbItem, typeof(ModelNotifiedForCategories), modelNotifiedForCategories); }
public ModelNotifiedForCategories GetCategoriesByID(int CategoryID, out string error) { error = null; CategoriesBsn bsn = new CategoriesBsn(wpfConfig); CategoriesInfo dbItem = bsn.GetValueByID(CategoryID); ModelNotifiedForCategories item = new ModelNotifiedForCategories(); Cloner.CopyAllTo(typeof(CategoriesInfo), dbItem, typeof(ModelNotifiedForCategories), item); return(item); }
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); }