public IssueTypeDS GetIssueCategorys(string agentNumber) { //Get issue categories IssueMgtServiceClient client = null; IssueTypeDS cats = null; try { cats = new IssueTypeDS(); client = new IssueMgtServiceClient(); IssueTypeDS _cats = client.GetIssueCategorys(); if (agentNumber == null) { cats.Merge(_cats); } else { cats.Merge(_cats.IssueTypeTable.Select("Category='Agent/Local'")); } client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetIssueCategorys() service error.", fe); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException("GetIssueCategorys() timeout error.", te); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException("GetIssueCategorys() communication error.", ce); } return(cats); }
public string GetIssueType(int typeID) { //Get an issue type for the specified id string issueType = ""; try { IssueTypeDS issueTypes = GetIssueTypes(""); IssueTypeDS.IssueTypeTableRow it = (IssueTypeDS.IssueTypeTableRow)issueTypes.IssueTypeTable.Select("ID=" + typeID)[0]; issueType = it.Type; } catch (Exception ex) { throw new ApplicationException("Unexpected error while reading issue type.", ex); } return(issueType); }
//Interface public dlgIssue(Issue issue) { //Constructor try { InitializeComponent(); this.btnOk.Text = CMD_OK; this.btnCancel.Text = CMD_CANCEL; this.mIssue = issue; this.mIssueCategorys = new IssueTypeDS(); this.mIssueTypes = new IssueTypeDS(); this.mContacts = new ContactDS(); } catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new dlgIssue instance.", ex); } }
public static IssueTypeDS GetIssueTypes(string issueCategory) { //Issue types- all or filtered by category IssueTypeDS issueTypes = null; try { _Client = new IssueMgtServiceClient(); issueTypes = _Client.GetIssueTypes(issueCategory); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetIssueTypes() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetIssueTypes() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetIssueTypes() communication error.", ce); } return(issueTypes); }
public static IssueTypeDS GetIssueCategorys() { //Issue type category IssueTypeDS categorys = new IssueTypeDS(); try { _Client = new IssueMgtServiceClient(); categorys = _Client.GetIssueCategorys(); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetIssueCategorys() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetIssueCategorys() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetIssueCategorys() communication error.", ce); } return(categorys); }
public IssueTypeDS GetIssueCategorys() { //Issue type category IssueTypeDS categorys = new IssueTypeDS(); try { IssueTypeDS issueTypes = GetIssueTypes(""); Hashtable groups = new Hashtable(); for (int i = 0; i < issueTypes.IssueTypeTable.Rows.Count; i++) { if (!groups.ContainsKey(issueTypes.IssueTypeTable[i].Category)) { groups.Add(issueTypes.IssueTypeTable[i].Category, issueTypes.IssueTypeTable[i].Category); categorys.IssueTypeTable.AddIssueTypeTableRow(0, "", issueTypes.IssueTypeTable[i].Category, ""); } } } catch (Exception ex) { throw new ApplicationException("Unexpected error while reading issue categories.", ex); } return(categorys); }
public IssueTypeDS GetIssueTypes(string issueCategory) { //Issue types- all or filtered by category IssueTypeDS issueTypes = new IssueTypeDS(); try { DataSet ds = fillDataset(USP_ISSUETYPES, TBL_ISSUETYPES, new object[] { }); if (ds.Tables[TBL_ISSUETYPES].Rows.Count > 0) { if (issueCategory != null && issueCategory.Trim().Length > 0) { IssueTypeDS _ds = new IssueTypeDS(); _ds.Merge(ds.Tables[TBL_ISSUETYPES].Select("Category='" + issueCategory + "'")); issueTypes.Merge(_ds); } else { issueTypes.Merge(ds); } } } catch (Exception ex) { throw new ApplicationException("Unexpected error while reading issue types.", ex); } return(issueTypes); }