コード例 #1
0
        public void DeleteData(ModelNotifiedForCustomers modelNotifiedForCustomers, out string error)
        {
            CustomersGenericREST CustomersGenericREST = new CustomersGenericREST(wpfConfig);
            DeleteCustomersView  deleteCustomersView  = new DeleteCustomersView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForCustomers), modelNotifiedForCustomers, typeof(DeleteCustomersView), deleteCustomersView);
            CustomersGenericREST.Delete(deleteCustomersView, out error);
        }
コード例 #2
0
        public void AddData(ModelNotifiedForCustomers modelNotifiedForCustomers, out string error)
        {
            CustomersGenericREST CustomersGenericREST = new CustomersGenericREST(wpfConfig);
            CreateCustomersView  createCustomersView  = new CreateCustomersView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForCustomers), modelNotifiedForCustomers, typeof(CreateCustomersView), createCustomersView);
            CustomersGenericREST.Insert(createCustomersView, out error);
        }
コード例 #3
0
        public void SaveData(ModelNotifiedForCustomers modelNotifiedForCustomers, out string error)
        {
            CustomersGenericREST CustomersGenericREST = new CustomersGenericREST(wpfConfig);
            UpdateCustomersView  updateCustomersView  = new UpdateCustomersView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForCustomers), modelNotifiedForCustomers, typeof(UpdateCustomersView), updateCustomersView);
            CustomersGenericREST.Update(updateCustomersView, out error);
        }
コード例 #4
0
        public void DeleteData(ModelNotifiedForCustomers modelNotifiedForCustomers, out string error)
        {
            CustomersBsn  bsn    = new CustomersBsn(wpfConfig);
            CustomersInfo dbItem = new CustomersInfo();

            Cloner.CopyAllTo(typeof(ModelNotifiedForCustomers), modelNotifiedForCustomers, typeof(CustomersInfo), dbItem);
            bsn.DeleteByID(dbItem, out error);
        }
コード例 #5
0
        public ModelNotifiedForCustomers GetCustomersByID(string CustomerID, out string error)
        {
            error = null;
            CustomersGenericREST      CustomersGenericREST      = new CustomersGenericREST(wpfConfig);
            GetCustomersView          getCustomersView          = CustomersGenericREST.GetByPK <GetCustomersView>(CustomerID, out error)[0];
            ModelNotifiedForCustomers modelNotifiedForCustomers = new ModelNotifiedForCustomers();

            Cloner.CopyAllTo(typeof(GetCustomersView), getCustomersView, typeof(ModelNotifiedForCustomers), modelNotifiedForCustomers);
            return(modelNotifiedForCustomers);
        }
コード例 #6
0
        public void AddData(ModelNotifiedForCustomers modelNotifiedForCustomers, out string error)
        {
            CustomersBsn  bsn    = new CustomersBsn(wpfConfig);
            CustomersInfo dbItem = new CustomersInfo();

            Cloner.CopyAllTo(typeof(ModelNotifiedForCustomers), modelNotifiedForCustomers, typeof(CustomersInfo), dbItem);
            bsn.InsertOne(dbItem, out error);
            modelNotifiedForCustomers.NewItem = false;
            Cloner.CopyAllTo(typeof(CustomersInfo), dbItem, typeof(ModelNotifiedForCustomers), modelNotifiedForCustomers);
        }
コード例 #7
0
        public ModelNotifiedForCustomers GetCustomersByID(string CustomerID, out string error)
        {
            error = null;
            CustomersBsn              bsn    = new CustomersBsn(wpfConfig);
            CustomersInfo             dbItem = bsn.GetValueByID(CustomerID);
            ModelNotifiedForCustomers item   = new ModelNotifiedForCustomers();

            Cloner.CopyAllTo(typeof(CustomersInfo), dbItem, typeof(ModelNotifiedForCustomers), item);
            return(item);
        }