30 lines
754 B
C#
30 lines
754 B
C#
|
|
using System;
|
|||
|
|
using System.Data;
|
|||
|
|
|
|||
|
|
public class TableFloor : TableBase<TableFloor, DataFloor>
|
|||
|
|
{
|
|||
|
|
public override DataFloor GetData(string pID)
|
|||
|
|
{
|
|||
|
|
return mDataList.Find(pItem => pItem.FloorID.ToString().Equals(pID));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[Serializable]
|
|||
|
|
public class DataFloor : DataBase<DataFloor>
|
|||
|
|
{
|
|||
|
|
public int FloorID;
|
|||
|
|
public string Icon;
|
|||
|
|
public int Price;
|
|||
|
|
public int AdCount;
|
|||
|
|
|
|||
|
|
public override void ParseData(DataRow pCollection)
|
|||
|
|
{
|
|||
|
|
FloorID = 0;
|
|||
|
|
int.TryParse(pCollection[0].ToString(), out FloorID);
|
|||
|
|
Icon = pCollection[1].ToString();
|
|||
|
|
Price = 0;
|
|||
|
|
int.TryParse(pCollection[2].ToString(), out Price);
|
|||
|
|
AdCount = 0;
|
|||
|
|
int.TryParse(pCollection[3].ToString(), out AdCount);
|
|||
|
|
}
|
|||
|
|
}
|