public static void AddFishData(string name, string json)
 {
     using (var con = GetDbConnection())
     {
         var animal = new AnimalsFish {
             Name = name, Data = json
         };
         con.InsertOrReplace(animal);
     }
 }
Exemple #2
0
        private static NormalAnimal SelectHemisphereAndConstructFish(Hemisphere hemisphere, AnimalsFish obj, bool owned, bool museumHave)
        {
            string time;

            if (obj.Time.Contains("全天"))
            {
                time = "全天";
            }
            else
            {
                time = obj.Time;
            }
            if (hemisphere == Hemisphere.North)
            {
                var normal = new NormalAnimal {
                    Name = obj.Name, Icon = obj.Image, Number = obj.Number, English = obj.English, Japanese = obj.Japanese, Price = Convert.ToInt32(obj.Price), Position = obj.Position, ShapeOrWeather = obj.Shape, Time = time, AppearMonth = MonthStringToList(obj.North), Owned = owned, MuseumHave = museumHave
                };
                return(normal);
            }
            else
            {
                var normal = new NormalAnimal {
                    Name = obj.Name, Icon = obj.Image, Number = obj.Number, English = obj.English, Japanese = obj.Japanese, Price = Convert.ToInt32(obj.Price), Position = obj.Position, ShapeOrWeather = obj.Shape, Time = time, AppearMonth = MonthStringToList(obj.South), Owned = owned, MuseumHave = museumHave
                };
                return(normal);
            }
        }