// transfer model to data and update, on a transaction
        // links:
        //  docLink: http://sql2x.org/documentationLink/aa07e05b-edc8-4e09-bf93-bf2a40c93c09
        public void Update(CrudeAirportSupplierModel model, SqlConnection connection, SqlTransaction transaction)
        {
            var data = new CrudeAirportSupplierData();

            ModelToData(model, data);
            data.Update(connection, transaction);
        }
        // transfer model to data and insert
        // links:
        //  docLink: http://sql2x.org/documentationLink/17cd8423-3c78-459f-a45b-773fcfbc3b7d
        public void Insert(CrudeAirportSupplierModel model)
        {
            var data = new CrudeAirportSupplierData();

            ModelToData(model, data);
            data.Insert();
        }
        // transfer model to data and update
        // links:
        //  docLink: http://sql2x.org/documentationLink/658fda50-2ad3-414e-9299-2b399d17a057
        public void Update(CrudeAirportSupplierModel model)
        {
            var data = new CrudeAirportSupplierData();

            ModelToData(model, data);
            data.Update();
        }
        // fetch all from table into new List of class instances, filtered by any column
        // links:
        //  docLink: http://sql2x.org/documentationLink/db27658d-4d23-46d7-9970-7bbaef8634b0
        public List <CrudeAirportSupplierModel> FetchWithFilter(System.Guid airportSupplierId, string aiportSupplierName, string airportSupplierCode, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeAirportSupplierModel>();
            List <CrudeAirportSupplierData> dataList = CrudeAirportSupplierData.FetchWithFilter(airportSupplierId, aiportSupplierName, airportSupplierCode, userId, dateTime);

            foreach (CrudeAirportSupplierData data in dataList)
            {
                var crudeAirportSupplierBusinessModel = new CrudeAirportSupplierModel();
                DataToModel(data, crudeAirportSupplierBusinessModel);
                list.Add(crudeAirportSupplierBusinessModel);
            }

            return(list);
        }
        // fetch all rows from table with an offset, and limit of rows
        // links:
        //  docLink: http://sql2x.org/documentationLink/a87e5c54-b47e-4031-bc3b-837b4cf9f692
        public List <CrudeAirportSupplierModel> FetchAllWithLimitAndOffset(string limit, string offset)
        {
            var list = new List <CrudeAirportSupplierModel>();
            List <CrudeAirportSupplierData> dataList = CrudeAirportSupplierData.FetchAllWithLimitAndOffset(int.Parse(limit), int.Parse(offset));

            foreach (CrudeAirportSupplierData crudeAirportSupplierBusiness in dataList)
            {
                var model = new CrudeAirportSupplierModel();
                DataToModel(crudeAirportSupplierBusiness, model);
                list.Add(model);
            }

            return(list);
        }
        // copy all rows from a List of serialized data objects in CrudeAirportSupplierData to a List of SOAP Contracts
        // links:
        //  docLink: http://sql2x.org/documentationLink/3d3e60c3-69e4-43d6-8bd5-14a67a6ecf58
        public List <CrudeAirportSupplierModel> FetchAll()
        {
            var list = new List <CrudeAirportSupplierModel>();
            List <CrudeAirportSupplierData> dataList = CrudeAirportSupplierData.FetchAll();

            foreach (CrudeAirportSupplierData crudeAirportSupplierBusiness in dataList)
            {
                var model = new CrudeAirportSupplierModel();
                DataToModel(crudeAirportSupplierBusiness, model);
                list.Add(model);
            }

            return(list);
        }
Beispiel #7
0
        public CrudeAirportSupplierModel CrudeAirportSupplierUpdate([Bind()] CrudeAirportSupplierModel airportSupplier)
        {
            new CrudeAirportSupplierBusiness().Update(airportSupplier);

            return(airportSupplier);
        }
Beispiel #8
0
        public CrudeAirportSupplierModel CrudeAirportSupplierCreate([Bind()] CrudeAirportSupplierModel airportSupplier)
        {
            new CrudeAirportSupplierBusiness().Insert(airportSupplier);

            return(airportSupplier);
        }