Пример #1
0
        public static Shipper GetShipperById(int ShipperId)
        {
            SqlParameter[] Parameters = new SqlParameter[1];
            Parameters[0] = new SqlParameter("@ShipperId", ShipperId);
            DataSet dsShipper = SQLHelper.ExecuteDataset("dbo.GetShipperById", Parameters);
            Shipper Shipper   = new Shipper();

            if (dsShipper.Tables[0].Rows.Count > 0)
            {
                Shipper = MapShipperObject(dsShipper.Tables[0].Rows[0]);
            }
            return(Shipper);
        }
Пример #2
0
        public static List <Shipper> GetShippers()
        {
            DataSet        dsShippers = SQLHelper.ExecuteDataset("dbo.GetShippers", null);
            List <Shipper> Shippers   = new List <Shipper>();

            if (dsShippers.Tables[0].Rows.Count > 0)
            {
                Shipper Shipper = new Shipper();
                for (int i = 0; i < dsShippers.Tables[0].Rows.Count; i++)
                {
                    Shipper = MapShipperObject(dsShippers.Tables[0].Rows[i]);
                    Shippers.Add(Shipper);
                }
            }
            return(Shippers);
        }