Example #1
0
        /// <summary>
        /// Get all data to fill combo box
        /// </summary>
        /// <param name="error"></param>
        /// <returns></returns>
        public List <ModelNotifiedForCustomers> GetAll_Customers(out string error)
        {
            CustomersGenericREST             CustomersGenericREST      = new CustomersGenericREST(wpfConfig);
            List <ModelNotifiedForCustomers> modelNotifiedForCustomers = CustomersGenericREST.GetAll <ModelNotifiedForCustomers>(100, 0, out error);

            return(modelNotifiedForCustomers);
        }
Example #2
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);
        }
Example #3
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);
        }
Example #4
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);
        }
Example #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);
        }
Example #6
0
        public List <ModelNotifiedForCustomers> GetAllCustomers(out string error)
        {
            CustomersGenericREST             CustomersGenericREST      = new CustomersGenericREST(wpfConfig);
            List <ModelNotifiedForCustomers> modelNotifiedForCustomers = CustomersGenericREST.GetAll <ModelNotifiedForCustomers>(100, 0, out error);

            if (!string.IsNullOrEmpty(error))
            {
                return(null);
            }

            //Initializing row status
            foreach (var item in modelNotifiedForCustomers)
            {
                item.ItemChanged = false;
                item.NewItem     = false;
            }

            return(modelNotifiedForCustomers);
        }