/
Default.aspx.cs
72 lines (63 loc) · 1.94 KB
/
Default.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RockstarSeating
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
int bid = 3939;
int siteId = 2;
int tid = 307;
string sortOrd = Request.QueryString["sortord"];
string sortCol = Request.QueryString["sortcol"];
string pageNum = Request.QueryString["pageNum"];
string pcatid = Request.QueryString["pcatid"];
//TODO: GetDataItem ZIP
string zip = "";
//get today
DateTime dt = DateTime.Now;
string today = dt.ToString("M/d/yy");
//now get one month from today
int endMonth = dt.Month + 1;
int endYear = dt.Year;
if(endMonth > 12){
endMonth = 1;
endYear = endYear + 1;
}
string nextMonth = endMonth + "/" + dt.Day + "/" + endYear;
//now show concerts, or theatre in localEvents plugin
int parentCategory;
Random random = new Random();
int randNum = random.Next(0, 2);
//2=concerts, 3=theatre
if (!string.IsNullOrWhiteSpace(pcatid))
{
parentCategory = Convert.ToInt16(pcatid);
}
else
{
parentCategory = (randNum == 1) ? 2 : 3;
}
lblPluginCategory.Visible = false;
StringBuilder plugin = new StringBuilder();
plugin.Append("<script type=\"text/javascript\" src=\"http://tickettransaction.com/?bid=" + bid);
plugin.Append("&sitenumber=" + siteId);
plugin.Append("&tid=" + tid);
plugin.Append("&zip=" + zip);
plugin.Append("&sdate=" + today);
plugin.Append("&edate=" + nextMonth);
plugin.Append("&pcatid=" + parentCategory);
plugin.Append("&sortcol=" + sortCol + "&sortord=" + sortOrd);
plugin.Append("&pageNum=" + pageNum);
plugin.Append("&showAll=30");
plugin.Append("\"></script>");
ticketDetail.Text = plugin.ToString();
}
}
}