Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }