/// <summary> /// Get all data to fill combo box /// </summary> /// <param name="error"></param> /// <returns></returns> public List <ModelNotifiedForSuppliers> GetAll_Suppliers(out string error) { SuppliersGenericREST SuppliersGenericREST = new SuppliersGenericREST(wpfConfig); List <ModelNotifiedForSuppliers> modelNotifiedForSuppliers = SuppliersGenericREST.GetAll <ModelNotifiedForSuppliers>(100, 0, out error); return(modelNotifiedForSuppliers); }
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); }
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); }
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); }
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); }
public List <ModelNotifiedForSuppliers> GetAllSuppliers(out string error) { SuppliersGenericREST SuppliersGenericREST = new SuppliersGenericREST(wpfConfig); List <ModelNotifiedForSuppliers> modelNotifiedForSuppliers = SuppliersGenericREST.GetAll <ModelNotifiedForSuppliers>(100, 0, out error); if (!string.IsNullOrEmpty(error)) { return(null); } //Initializing row status foreach (var item in modelNotifiedForSuppliers) { item.ItemChanged = false; item.NewItem = false; } return(modelNotifiedForSuppliers); }