コード例 #1
0
        public EquipmentTypes GetDriverEquipmentTypes()
        {
            //
            EquipmentTypes types = new EquipmentTypes();
            DataSet        ds    = new DataService().FillDataset(this.mConnectionID, USP_EQUIPTYPE, TBL_EQUIPTYPE, null);

            if (ds.Tables[TBL_EQUIPTYPE].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[TBL_ENTERPRISEAGENTS].Rows.Count; i++)
                {
                    types.Add(new EquipmentType(int.Parse(ds.Tables[TBL_EQUIPTYPE].Rows[i]["ID"].ToString()), ds.Tables[TBL_EQUIPTYPE].Rows[i]["Description"].ToString(), int.Parse(ds.Tables[TBL_EQUIPTYPE].Rows[i]["MPG"].ToString())));
                }
            }
            return(types);
        }