-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.aspx.cs
36 lines (32 loc) · 1.14 KB
/
index.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
using System;
namespace EOXAdvisor
{
public partial class index : System.Web.UI.Page
{
static string accessToken;
protected async void Page_Load(object sender, EventArgs e)
{
if(accessToken == null)
{
accessToken = await Authenticator.Authenticate();
}
}
protected async void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text != "Paste in 'show inventory' or a comma separated list of up to 20 PIDs..." &&
TextBox1.Text.Length > 2)
{
string PIDS = InputParser.ParseTextboxInput(TextBox1.Text);
if (PIDS != "")
{
APIResponseObjects.PID.EOXByRecord EOXRecordsPID = await QueryAPI.GetEOXDetailsByPID<APIResponseObjects.PID.EOXByRecord>(accessToken, PIDS);
if (EOXRecordsPID != null)
{
Literal1.Text = ReportGenerator.CreateEOXByPIDReport(EOXRecordsPID);
form1.Visible = false;
}
}
}
}
}
}