Beispiel #1
0
        public string[] eve_history(string s)
        {
            string[] ss = new string[2];
            EVE_Central.DAL.Central   dal     = new EVE_Central.DAL.Central();
            EVE_Central.Model.Central model   = new EVE_Central.Model.Central();
            EVE_Central.Model.name_en ENmodel = dal.API_definitelyStringGetModel(s);//英文匹配
            int typeid = 0;

            if (ENmodel != null)
            {
                typeid = ENmodel.typeID;
                ss[0]  = ENmodel.物品名称;
            }
            else
            {
                model = dal.API_chines(s);//特征词匹配
                if (model != null)
                {
                    typeid = Convert.ToInt32(model.typeID);
                    ss[0]  = model.物品名称;
                }
                else
                {
                    model = dal.API_StringGetModel(s);
                    if (model != null)
                    {
                        typeid = Convert.ToInt32(model.typeID);
                        ss[0]  = model.物品名称;
                    }
                    else
                    {
                        return(null);
                    }
                }
            }

            ss[1] = "https://www.eve-central.cn/HistoryShow.aspx?typeid=" + typeid.ToString();
            return(ss);
        }
Beispiel #2
0
 /// <summary>
 /// 英文匹配
 /// </summary>
 /// <param name="row"></param>
 /// <returns></returns>
 public EVE_Central.Model.name_en ENDataRowToModel(DataRow row)
 {
     EVE_Central.Model.name_en model = new EVE_Central.Model.name_en();
     if (row != null)
     {
         if (row["typeID"] != null && row["typeID"].ToString() != "")
         {
             model.typeID = int.Parse(row["typeID"].ToString());
         }
         if (row["物品名称"] != null)
         {
             model.物品名称 = row["物品名称"].ToString();
         }
         if (row["name_en"] != null)
         {
             model.name = row["name_en"].ToString();
         }
         if (row["marketGroupID"] != null && row["marketGroupID"].ToString() != "")
         {
             model.marketGroupID = int.Parse(row["marketGroupID"].ToString());
         }
     }
     return(model);
 }