Exemple #1
0
        /// <summary>
        /// api专用
        /// </summary>
        /// <param name="row"></param>
        /// <returns></returns>
        public EVE_Central.Model.cnoren APIDataRowToModel(DataRow row)
        {
            EVE_Central.Model.cnoren model = new EVE_Central.Model.cnoren();
            if (row != null)
            {
                if (row["typeID"] != null && row["typeID"].ToString() != "")
                {
                    model.typeID = int.Parse(row["typeID"].ToString());
                }
                if (row["物品名称"] != null)
                {
                    model.cn = row["物品名称"].ToString();
                }
                if (row["name_en"] != null)
                {
                    model.en = row["name_en"].ToString();
                }
                if (row["描述"] != null)
                {
                    model.mcn = row["描述"].ToString();
                }
                if (row["description_en"] != null)
                {
                    model.men = row["description_en"].ToString();
                }
            }

            return(model);
        }
Exemple #2
0
 /// <summary>
 /// api专用 根据物品id获取中文和英文信息
 /// </summary>
 /// <param name="typeid"></param>
 /// <returns></returns>
 public Model.cnoren apifind(int typeid)
 {
     EVE_Central.Model.cnoren m = dal.APIGetModel(typeid);
     if (m == null)
     {
         return(null);
     }
     else
     {
         return(m);
     }
 }