Beispiel #1
0
        public void DeleteData(ModelNotifiedForSuppliers modelNotifiedForSuppliers, out string error)
        {
            SuppliersGenericREST SuppliersGenericREST = new SuppliersGenericREST(wpfConfig);
            DeleteSuppliersView  deleteSuppliersView  = new DeleteSuppliersView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForSuppliers), modelNotifiedForSuppliers, typeof(DeleteSuppliersView), deleteSuppliersView);
            SuppliersGenericREST.Delete(deleteSuppliersView, out error);
        }
Beispiel #2
0
        public void DeleteData(ModelNotifiedForSuppliers modelNotifiedForSuppliers, out string error)
        {
            SuppliersBsn  bsn    = new SuppliersBsn(wpfConfig);
            SuppliersInfo dbItem = new SuppliersInfo();

            Cloner.CopyAllTo(typeof(ModelNotifiedForSuppliers), modelNotifiedForSuppliers, typeof(SuppliersInfo), dbItem);
            bsn.DeleteByID(dbItem, out error);
        }
Beispiel #3
0
        public void AddData(ModelNotifiedForSuppliers modelNotifiedForSuppliers, out string error)
        {
            SuppliersGenericREST SuppliersGenericREST = new SuppliersGenericREST(wpfConfig);
            CreateSuppliersView  createSuppliersView  = new CreateSuppliersView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForSuppliers), modelNotifiedForSuppliers, typeof(CreateSuppliersView), createSuppliersView);
            SuppliersGenericREST.Insert(createSuppliersView, out error);
        }
Beispiel #4
0
        public void SaveData(ModelNotifiedForSuppliers modelNotifiedForSuppliers, out string error)
        {
            SuppliersGenericREST SuppliersGenericREST = new SuppliersGenericREST(wpfConfig);
            UpdateSuppliersView  updateSuppliersView  = new UpdateSuppliersView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForSuppliers), modelNotifiedForSuppliers, typeof(UpdateSuppliersView), updateSuppliersView);
            SuppliersGenericREST.Update(updateSuppliersView, out error);
        }
Beispiel #5
0
        public void AddData(ModelNotifiedForSuppliers modelNotifiedForSuppliers, out string error)
        {
            SuppliersBsn  bsn    = new SuppliersBsn(wpfConfig);
            SuppliersInfo dbItem = new SuppliersInfo();

            Cloner.CopyAllTo(typeof(ModelNotifiedForSuppliers), modelNotifiedForSuppliers, typeof(SuppliersInfo), dbItem);
            bsn.InsertOne(dbItem, out error);
            modelNotifiedForSuppliers.NewItem = false;
            Cloner.CopyAllTo(typeof(SuppliersInfo), dbItem, typeof(ModelNotifiedForSuppliers), modelNotifiedForSuppliers);
        }
Beispiel #6
0
        public ModelNotifiedForSuppliers GetSuppliersByID(int SupplierID, out string error)
        {
            error = null;
            SuppliersBsn              bsn    = new SuppliersBsn(wpfConfig);
            SuppliersInfo             dbItem = bsn.GetValueByID(SupplierID);
            ModelNotifiedForSuppliers item   = new ModelNotifiedForSuppliers();

            Cloner.CopyAllTo(typeof(SuppliersInfo), dbItem, typeof(ModelNotifiedForSuppliers), item);
            return(item);
        }
Beispiel #7
0
        public ModelNotifiedForSuppliers GetSuppliersByID(int SupplierID, out string error)
        {
            error = null;
            SuppliersGenericREST      SuppliersGenericREST      = new SuppliersGenericREST(wpfConfig);
            GetSuppliersView          getSuppliersView          = SuppliersGenericREST.GetByPK <GetSuppliersView>(SupplierID, out error)[0];
            ModelNotifiedForSuppliers modelNotifiedForSuppliers = new ModelNotifiedForSuppliers();

            Cloner.CopyAllTo(typeof(GetSuppliersView), getSuppliersView, typeof(ModelNotifiedForSuppliers), modelNotifiedForSuppliers);
            return(modelNotifiedForSuppliers);
        }