Ejemplo n.º 1
0
        public static bool CreateIssueAction(byte typeID, long issueID, string userID, string comment)
        {
            //Create a new action
            bool b = false;

            try {
                _Client = new IssueMgtServiceClient();
                b       = _Client.CreateIssueAction(typeID, issueID, userID, comment);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("CreateIssueAction() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("CreateIssueAction() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("CreateIssueAction() communication error.", ce); }
            return(b);
        }
Ejemplo n.º 2
0
    protected void OnCommandClick(object sender, CommandEventArgs e)
    {
        //Event handler for command button clicked
        switch (e.CommandName)
        {
        case "Cancel":
            Response.Redirect("~/Default.aspx?issueID=" + this.mIssueID.ToString());
            break;

        case "OK":
            IssueMgtServiceClient crgService = new IssueMgtServiceClient();
            bool ret = crgService.CreateIssueAction(Convert.ToByte(this.cboActionType.SelectedValue), this.mIssueID, HttpContext.Current.User.Identity.Name, this.txtComments.Text);
            Response.Redirect("~/Default.aspx?issueID=" + this.mIssueID.ToString());
            break;
        }
    }
Ejemplo n.º 3
0
    protected void OnButtonClick(object sender, EventArgs e)
    {
        //Event handler for command button clicked
        Button btn = (Button)sender;

        switch (btn.ID)
        {
        case "btnCancel":
            Response.Redirect("~/IssueMgt.aspx?issueID=" + this.mIssueID.ToString());
            break;

        case "btnOk":
            IssueMgtServiceClient crgService = new IssueMgtServiceClient();
            bool ret = crgService.CreateIssueAction(Convert.ToByte(this.cboActionType.SelectedValue), this.mIssueID, Environment.UserName, this.txtComments.Text);
            Response.Redirect("~/IssueMgt.aspx?issueID=" + this.mIssueID.ToString());
            break;
        }
    }