示例#1
0
 public BaseCard(decimal price, CountriesEnum country, HotelTypes hotelClass, FoodTypes food)
 {
     Price      = price;
     Country    = country;
     HotelClass = hotelClass;
     Food       = food;
 }
 public List <League> GetLeaguesByCountry(CountriesEnum country)
 {
     using (var db = new SQLiteConnection(Platform, DatabasePath))
     {
         return(db.GetAllWithChildren <League>(l => l.Country == country));
     }
 }
示例#3
0
 public Excursion(decimal price, CountriesEnum country, HotelTypes hotelClass, FoodTypes food)
     : base(price, country, hotelClass, food)
 {
     Price      = price;
     Country    = country;
     HotelClass = hotelClass;
     Food       = food;
 }
        public int AddReferee(int id, string name, CountriesEnum country, short number = 0, short penalty = 0)
        {
            using (var db = new SQLiteConnection(Platform, DatabasePath))
            {
                Referee r = new Referee();
                r.Id      = id;
                r.Name    = name;
                r.Number  = number;
                r.Penalty = penalty;
                r.Matches = new List <Match>();
                r.Country = country;

                db.Insert(r);

                return(r.Id);
            }
        }
示例#5
0
        public static string ToCountryString(this CountriesEnum country)
        {
            switch (country)
            {
            case CountriesEnum.HU:
                return("HU");

            case CountriesEnum.SE:
                return("SE");

            case CountriesEnum.FL:
                return("FL");

            case CountriesEnum.SW:
                return("SW");

            case CountriesEnum.CZ:
                return("CZ");

            default:
                return("");
            }
        }
示例#6
0
        public static string ToFriendlyString(this CountriesEnum country)
        {
            switch (country)
            {
            case CountriesEnum.HU:
                return("Hungary");

            case CountriesEnum.SE:
                return("Sweden");

            case CountriesEnum.FL:
                return("Finnland");

            case CountriesEnum.SW:
                return("Switzerland");

            case CountriesEnum.CZ:
                return("Checz Republic");

            default:
                return("");
            }
        }
示例#7
0
 public Shopping(decimal price, CountriesEnum country, HotelTypes hotelClass, FoodTypes food)
     : base(price, country, hotelClass, food)
 {
 }
示例#8
0
 public static int AddTeam(string name, DateTime year, string coach, string sex, CountriesEnum country, int stadiumId, int leagueId)
 {
     return(Network.Post <TeamModel, int>(new HTTPPostRequestModel <TeamModel>
     {
         Url = "/api/floorball/teams",
         ErrorMsg = "Error during adding team!",
         Body = new TeamModel
         {
             Name = name,
             Year = year,
             Coach = coach,
             Sex = sex,
             Country = country,
             StadiumId = stadiumId,
             LeagueId = leagueId
         }
     }));
 }
示例#9
0
        public int AddTeam(int id, string name, DateTime year, string coach, GenderEnum gender, CountriesEnum country, int stadiumId, int leagueId, string imageName, short get = 0, short scored = 0, short points = 0, short standing = -1)
        {
            using (var db = new SQLiteConnection(Platform, DatabasePath))
            {
                Team t = new Team();
                t.Id        = id;
                t.Name      = name;
                t.Year      = year;
                t.Coach     = coach;
                t.Gender    = gender;
                t.Country   = country;
                t.Get       = get;
                t.Scored    = scored;
                t.Points    = points;
                t.StadiumId = stadiumId;
                t.LeagueId  = leagueId;
                t.Standing  = standing != -1 ? standing : (short)(db.GetAllWithChildren <Team>().Where(t1 => t1.LeagueId == leagueId).Count() + 1);
                t.ImageName = imageName;

                db.Insert(t);

                return(t.Id);
            }
        }
        public int AddLeague(int id, string name, DateTime year, string type, string classname, int rounds, CountriesEnum country, string sex)
        {
            using (var db = new SQLiteConnection(Platform, DatabasePath))
            {
                League l = new League();
                l.Id        = id;
                l.Name      = name;
                l.Year      = year;
                l.Type      = type;
                l.ClassName = classname;
                l.Rounds    = rounds;
                l.Country   = country;
                l.Sex       = sex;

                db.Insert(l);

                return(l.Id);
            }
        }
        public int AddLeague(int id, string name, DateTime year, LeagueTypeEnum type, ClassEnum classname, short rounds, CountriesEnum country, GenderEnum gender)
        {
            using (var db = new SQLiteConnection(Platform, DatabasePath))
            {
                League l = new League();
                l.Id      = id;
                l.Name    = name;
                l.Year    = year;
                l.Type    = type;
                l.Class   = classname;
                l.Rounds  = rounds;
                l.Country = country;
                l.Gender  = gender;

                db.Insert(l);

                return(l.Id);
            }
        }
示例#12
0
 public Treatment(decimal price, CountriesEnum country, HotelTypes hotelClass, FoodTypes food)
     : base(price, country, hotelClass, food)
 {
 }