Esempio n. 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;
        }
Esempio n. 2
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;
        }