Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
        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);
        }
Example #7
0
        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);
        }