Exemplo n.º 1
0
        public ObservableCollection <csProfile> ProfileBySport(string d1, string d2, string idP, string sport)
        {
            ObservableCollection <csProfile> data = new ObservableCollection <csProfile>();
            csProfile profile = null;

            try
            {
                parameters.Clear();
                parameters.Add("@pStartDate", d1);
                parameters.Add("@pEndDate", d2);
                parameters.Add("@pPlayer", idP);

                dataset = csG8Apps.ExecutePA("[dbo].[web_profileBySport]", parameters);

                if (dataset.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow fila in dataset.Tables[0].Rows)
                    {
                        profile                = new csProfile();
                        profile.Sport          = fila["IdSport"].ToString();
                        profile.RiskAmount     = Convert.ToInt32(fila["RISK"]);
                        profile.Net            = Convert.ToInt32(fila["NET"]);
                        profile.WinAmount      = Convert.ToInt32(fila["WIN"]);
                        profile.Bets           = Convert.ToInt32(fila["BETS"]);
                        profile.HoldPercentaje = Math.Round(Convert.ToDouble(fila["HOLD_PER"]), 2, MidpointRounding.AwayFromZero);
                        profile.CountWins      = Convert.ToInt32(fila["WINS"]);
                        profile.CountLoses     = Convert.ToInt32(fila["LOSES"]);
                        profile.CountDraws     = Convert.ToInt32(fila["DRAWS"]);
                        profile.WinPercentaje  = Math.Round(Convert.ToDouble(fila["WIN_PER"]), 2, MidpointRounding.AwayFromZero);
                        profile.Scalping5Dimes = Convert.ToInt32(fila["Scalping5Dimes"]);
                        profile.ScalpingCris   = Convert.ToInt32(fila["ScalpingCris"]);
                        profile.ScalpingJazz   = Convert.ToInt32(fila["ScalpingJazz"]);
                        profile.ScalpingPinni  = Convert.ToInt32(fila["ScalpingPinni"]);
                        profile.ScalpingPPH    = Convert.ToInt32(fila["ScalpingPPH"]);
                        profile.MoveLine       = Convert.ToInt32(fila["LineMover"]);
                        profile.BeatLine       = Convert.ToInt32(fila["BeatLine"]);

                        if (profile.Sport.ToUpper().Trim().Contains(sport.ToUpper().Trim()))
                        {
                            data.Add(profile);
                        }
                    }
                }
                else
                {
                    data = null;
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                parameters.Clear();
            }

            return(data);
        }
Exemplo n.º 2
0
        public ObservableCollection <csProfile> ProfileByBets(string d1, string d2, string idP, string sport, string league, string favdog, string wagerplay)
        {
            ObservableCollection <csProfile> data = new ObservableCollection <csProfile>();
            csProfile profile = null;

            try
            {
                parameters.Clear();
                parameters.Add("@pStartDate", d1);
                parameters.Add("@pEndDate", d2);
                parameters.Add("@pPlayer", idP);
                parameters.Add("@pSport", sport);
                parameters.Add("@pLeague", league);
                parameters.Add("@pFavDog", favdog);
                parameters.Add("@pWagerPlay", wagerplay);
                dataset = csG8Apps.ExecutePA("[dbo].[web_profileByBets]", parameters);

                if (dataset.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow fila in dataset.Tables[0].Rows)
                    {
                        profile     = new csProfile();
                        profile.Net = Convert.ToInt32(fila["Net"]);
                        profile.PlacedDateString  = CastDate(Convert.ToDateTime(fila["PlacedDate"]));
                        profile.RiskAmount        = Convert.ToInt32(fila["RiskAmount"]);
                        profile.Points            = Convert.ToDouble(fila["Points"]);
                        profile.Odds              = Convert.ToInt32(fila["Odds"]);
                        profile.EventDateString   = CastDate(Convert.ToDateTime(fila["EventDate"]));
                        profile.HomeTem           = Convert.ToString(fila["HomeTeam"]);
                        profile.VisitorTem        = Convert.ToString(fila["VisitorTeam"]);
                        profile.Sport             = Convert.ToString(fila["IdSport"]);
                        profile.League            = Convert.ToString(fila["League"]);
                        profile.WagerType         = Convert.ToString(fila["WagerPlay"]);
                        profile.FavDog            = Convert.ToString(fila["PickFavDog"]);
                        profile.DetailDescription = Convert.ToString(fila["DetailDescription"]);
                        data.Add(profile);
                    }
                }
                else
                {
                    data = null;
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                parameters.Clear();
            }

            return(data);
        }
Exemplo n.º 3
0
        public ObservableCollection <csProfile> BreakDownPlayer(string d1, string d2, string sport, string league, string player, string wagerPlay, string wagerType)
        {
            ObservableCollection <csProfile> data = new ObservableCollection <csProfile>();
            csProfile p = null;

            try
            {
                parameters.Clear();
                parameters.Add("@LogIdUser", 74);
                parameters.Add("@prmStartDate", d1);
                parameters.Add("@prmEndDate", d2);
                parameters.Add("@prmBook", "");
                parameters.Add("@prmOffice", "");
                parameters.Add("@prmPlayer", player);
                parameters.Add("@prmLeague", (league == "-1") ? "" : league);
                parameters.Add("@prmGroupby", 0);
                parameters.Add("@prmOrderby", 0);
                dataset = csConnection.ExecutePA("[dbo].[Report_Game_Statistic]", parameters);

                if (dataset.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow fila in dataset.Tables[0].Rows)
                    {
                        p            = new csProfile();
                        p.Sport      = fila["Group1"].ToString();
                        p.WagerType  = fila["Group2"].ToString();
                        p.GamePeriod = fila["Group3"].ToString();
                        p.WagerPlay  = fila["Group4"].ToString();
                        p.RiskAmount = Convert.ToInt32(fila["Amount"]);
                        //p.Bets = Convert.ToInt32(fila["BETS"]);
                        p.Net            = Convert.ToInt32(fila["WinLost"]);
                        p.HoldPercentaje = Math.Round(Convert.ToDouble((p.Net * 100) / p.RiskAmount), 2, MidpointRounding.AwayFromZero);

                        if (p.WagerType.ToUpper().Contains(wagerType.ToUpper()) &&
                            p.Sport.ToUpper().Contains(sport.Trim().ToUpper()))
                        {
                            data.Add(p);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                parameters.Clear();
            }

            return(data);
        }
Exemplo n.º 4
0
        public csProfile CurrentWeek(string d1, string d2, string sport, string player, string wagerType)
        {
            csProfile p = null;

            try
            {
                parameters.Clear();
                parameters.Add("@LogIdUser", 74);
                parameters.Add("@prmStartDate", d1);
                parameters.Add("@prmEndDate", d2);
                parameters.Add("@prmBook", "");
                parameters.Add("@prmOffice", "");
                parameters.Add("@prmPlayer", player);
                parameters.Add("@prmLeague", "");
                parameters.Add("@prmGroupby", 0);
                parameters.Add("@prmOrderby", 0);
                dataset = csConnection.ExecutePA("[dbo].[Report_Game_Statistic]", parameters);
                p       = new csProfile();

                if (dataset.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow fila in dataset.Tables[0].Rows)
                    {
                        //p.HoldPercentaje = Math.Round(Convert.ToDouble((p.Net * 100) / p.RiskAmount), 2, MidpointRounding.AwayFromZero);
                        p.Sport     = fila["Group1"].ToString();
                        p.WagerType = fila["Group2"].ToString();

                        if (p.WagerType.ToUpper().Contains(wagerType.ToUpper()) &&
                            p.Sport.ToUpper().Contains(sport.Trim().ToUpper()))
                        {
                            p.Net        += Convert.ToInt32(fila["WinLost"]);
                            p.RiskAmount += Convert.ToInt32(fila["Amount"]);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                parameters.Clear();
            }

            return(p);
        }
Exemplo n.º 5
0
        public ObservableCollection <csProfile> GetProfile(string d1, string d2, string idP)
        {
            ObservableCollection <csProfile> data = new ObservableCollection <csProfile>();
            csProfile profile = null;

            try
            {
                parameters.Clear();
                parameters.Add("@pStartDate", d1);
                parameters.Add("@pEndDate", d2);
                parameters.Add("@pIdPlayer", idP);
                dataset = csG8Apps.ExecutePA("[dbo].[web_ProfileByPlayer]", parameters);

                if (dataset.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow fila in dataset.Tables[0].Rows)
                    {
                        profile              = new csProfile();
                        profile.CountSP      = Convert.ToInt32(fila["SP"]);
                        profile.CountML      = Convert.ToInt32(fila["ML"]);
                        profile.CountDR      = Convert.ToInt32(fila["DR"]);
                        profile.CountUNDER   = Convert.ToInt32(fila["UND"]);
                        profile.CountOVER    = Convert.ToInt32(fila["OVE"]);
                        profile.CountHome    = Convert.ToInt32(fila["HOM"]);
                        profile.CountVisitor = Convert.ToInt32(fila["VIS"]);

                        profile.CountMorning   = Convert.ToInt32(fila["MORNING"]);
                        profile.CountNoon      = Convert.ToInt32(fila["NOON"]);
                        profile.CountNight     = Convert.ToInt32(fila["NIGHT"]);
                        profile.CountOverNight = Convert.ToInt32(fila["OVERNIGHT"]);

                        profile.CountWins  = Convert.ToInt32(fila["WINS"]);
                        profile.CountLoses = Convert.ToInt32(fila["LOSES"]);
                        profile.CountDraws = Convert.ToInt32(fila["DRAWS"]);

                        profile.CountFav = Convert.ToInt32(fila["FAV"]);
                        profile.CountDog = Convert.ToInt32(fila["DOG"]);

                        profile.CountLineMoved   = Convert.ToInt32(fila["LMOVED"]);
                        profile.CountNoLineMoved = Convert.ToInt32(fila["LNOMOVED"]);

                        profile.Net            = Convert.ToInt32(fila["NET"]);
                        profile.HoldPercentaje = Math.Round(Convert.ToDouble(fila["HOLD_PER"]), 2, MidpointRounding.AwayFromZero);
                        profile.RiskAmount     = Convert.ToInt32(fila["RISK"]);
                        profile.WinAmount      = Convert.ToInt32(fila["WIN"]);

                        profile.CountLive   = Convert.ToInt32(fila["LIVE"]);
                        profile.CountNoLive = Convert.ToInt32(fila["NOLIVE"]);

                        profile.CountBuy   = Convert.ToInt32(fila["BUY"]);
                        profile.CountNoBuy = Convert.ToInt32(fila["NOBUY"]);

                        data.Add(profile);
                    }
                }
                else
                {
                    data = null;
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                parameters.Clear();
            }

            return(data);
        }