/// <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); }
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); }
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); }
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); }
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); }
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); }