Beispiel #1
0
        /// <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);
        }
Beispiel #2
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 #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 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);
        }
Beispiel #6
0
        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);
        }