Beispiel #1
0
        protected void endMonth_SelectedIndexChanged(object sender, EventArgs e)
        {
            string   start     = endYear.SelectedValue + "-" + GlobalBetsAdmin.getMonthSqlValue(endMonth.SelectedValue) + "-" + endDay.SelectedValue + " 00:00:00.000";
            DateTime startDate = Convert.ToDateTime(start);

            Session["selecteddate"] = startDate;
        }
Beispiel #2
0
        private void datePicker()
        {
            DateTime today = DateTime.Today;

            startDay.DataSource = GlobalBetsAdmin.getDays(DateTime.Now.Month);
            startDay.DataBind();
            startMonth.DataSource = GlobalBetsAdmin.getMonths();
            startMonth.DataBind();
            startYear.DataSource = GlobalBetsAdmin.getYears();
            startYear.DataBind();

            endDay.DataSource = GlobalBetsAdmin.getDays(5);
            endDay.DataBind();
            endMonth.DataSource = GlobalBetsAdmin.getMonths();
            endMonth.DataBind();
            endYear.DataSource = GlobalBetsAdmin.getYears();
            endYear.DataBind();

            //change dates on dropdwon navigation
            startDay.SelectedValue   = today.Day.ToString();
            startMonth.SelectedValue = GlobalBetsAdmin.MONTH[today.Month - 1];
            startYear.SelectedValue  = today.Year.ToString();
            endDay.SelectedValue     = today.Day.ToString();
            endMonth.SelectedValue   = GlobalBetsAdmin.MONTH[today.Month - 1];
            endYear.SelectedValue    = today.Year.ToString();
        }
Beispiel #3
0
        protected void navigateByDate_Click(object sender, EventArgs e)
        {
            string   start     = startYear.SelectedValue + "-" + GlobalBetsAdmin.getMonthSqlValue(startMonth.SelectedValue) + "-" + startDay.SelectedValue + " 00:00:00.000";
            string   end       = endYear.SelectedValue + "-" + GlobalBetsAdmin.getMonthSqlValue(endMonth.SelectedValue) + "-" + endDay.SelectedValue + " 23:59:59.999";
            DateTime startDate = Convert.ToDateTime(start);
            DateTime endDate   = Convert.ToDateTime(end);

            if (endDate > DateTime.Today)
            {
                endDate = DateTime.Today.AddDays(1);
            }
            bindByDate(startDate, endDate);
            currentDate.Text        = startDate.ToLongDateString() + " to " + endDate.ToLongDateString();
            Session["selecteddate"] = startDate;
            Session["enddate"]      = endDate;
        }
Beispiel #4
0
    public int TestBetType(int betids) // Test  for doublechance halftime and and handicap to increase minimum recieptsize
    {
        int correct = 3;

        SqlParameter[] param = new SqlParameter[2];

        param[0] = new SqlParameter("@TeamCode", betids);
        param[1] = new SqlParameter("@mode", "TestTeamscode");
        DataTable dtEmployee = new DataTable();

        dtEmployee = objDBBridge.ExecuteDataset(_spName2, param).Tables[0];
        if (dtEmployee.Rows.Count != 0)
        {
            DataRow dr;
            dr = dtEmployee.Rows[0];
            string bettype;
            bettype = dr["bettype"].ToString().Trim().ToLower();

            switch (bettype)
            {
            case "straight":
                return(GlobalBetsAdmin.GetSize(GlobalBetsAdmin.BetOptions(), 1));

            case "wire":
                return(GlobalBetsAdmin.GetSize(GlobalBetsAdmin.BetOptions(), 2));

            case "dc":
                return(GlobalBetsAdmin.GetSize(GlobalBetsAdmin.BetOptions(), 3));

            case "hc":
                return(GlobalBetsAdmin.GetSize(GlobalBetsAdmin.BetOptions(), 4));

            case "halftime":
                return(GlobalBetsAdmin.GetSize(GlobalBetsAdmin.BetOptions(), 5));

            case "oddeven":
                return(GlobalBetsAdmin.GetSize(GlobalBetsAdmin.BetOptions(), 6));
            }
        }
        return(correct);
    }
Beispiel #5
0
    public bool TestIfGameIsActivated(string bettype)
    {
        switch (bettype)
        {
        case "straight":
            if (GlobalBetsAdmin.isActivated(0))
            {
                return(true);
            }
            else
            {
                return(false);
            }

        case "wire":
            if (GlobalBetsAdmin.isActivated(1))
            {
                return(true);
            }
            else
            {
                return(false);
            }

        case "dc":
            if (GlobalBetsAdmin.isActivated(2))
            {
                return(true);
            }
            else
            {
                return(false);
            }

        case "halftime":
            if (GlobalBetsAdmin.isActivated(3))
            {
                return(true);
            }
            else
            {
                return(false);
            }

        case "oddeven":
            if (GlobalBetsAdmin.isActivated(5))
            {
                return(true);
            }
            else
            {
                return(false);
            }

        case "hc":
            if (GlobalBetsAdmin.isActivated(4))
            {
                return(true);
            }
            return(false);


            //end testing whether the game is activated
        }
        return(false);
    }
Beispiel #6
0
 private void bindByKeyword(string keyword)
 {
     gvParentGrid.DataSource = GlobalBetsAdmin.searchCompleteBets(keyword, GlobalBetsAdmin.ONLINE);
     gvParentGrid.DataBind();
     smscount.Text = "" + gvParentGrid.Rows.Count;
 }