//Members //Interface protected void Page_Load(object sender, EventArgs e) { //Event handler for page load event if (!Page.IsPostBack) { //Get query params long issueID = Convert.ToInt64(Request.QueryString["issueID"]); IssueMgtServiceClient client = new IssueMgtServiceClient(); Issue issue = client.GetIssue(issueID); Response.Write("Issue Type: " + issue.Type + "<br />"); Response.Write("Subject: " + issue.Subject + "<br />"); Response.Write("Contact: " + issue.ContactName + "<br /><br />"); Response.Write("Company: " + issue.CompanyName + "<br />"); Response.Write("Store: " + issue.StoreNumber.ToString() + "<br />"); Response.Write("Agent: " + issue.AgentNumber + "<br />"); Response.Write("Zone: " + issue.Zone); CustomerProxy cp = new CustomerProxy(); Argix.Customers.Action[] actions = cp.GetIssueActions(issueID); for (int i = 0; i < actions.Length; i++) { string cell = "<br /><br /><hr />"; cell += actions[i].Created.ToString("g") + ", " + actions[i].UserID; cell += "<br />"; cell += actions[i].TypeName; cell += "<br /><br />"; cell += actions[i].Comment; Response.Write(cell); } } }
public static Issue GetIssue(long issueID) { //Get an existing issue Issue issue = null; try { _Client = new IssueMgtServiceClient(); issue = _Client.GetIssue(issueID); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetIssue() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetIssue() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetIssue() communication error.", ce); } return(issue); }
//Members //Interface protected void Page_Load(object sender, EventArgs e) { //Event handler for page load event if (!Page.IsPostBack) { //Get query params long issueID = Convert.ToInt64(Request.QueryString["issueID"]); IssueMgtServiceClient client = new IssueMgtServiceClient(); Issue issue = client.GetIssue(issueID); this.lblType.Text = issue.Type; this.lblSubject.Text = issue.Subject; this.lblContact.Text = issue.ContactName; this.lblCompany.Text = issue.CompanyName; this.lblStore.Text = issue.StoreNumber.ToString(); this.lblAgent.Text = issue.AgentNumber; this.lblZone.Text = issue.Zone; CustomerProxy cp = new CustomerProxy(); Argix.Customers.Action[] actions = cp.GetIssueActions(issueID); for (int i = 0; i < actions.Length; i++) { string cell = actions[i].Created.ToString("f") + " " + actions[i].UserID + ", " + actions[i].TypeName; cell += "<br /><br />"; cell += actions[i].Comment; cell += "<br />"; cell += "<hr />"; cell += "<br />"; TableCell tc = new TableCell(); tc.Text = cell; TableRow tr = new TableRow(); tr.Cells.Add(tc); this.tblPage.Rows.Add(tr); } } }