Beispiel #1
0
    protected void btnClose_Click(object sender, EventArgs e)
    {
        if (!validateFormInput())
        {
            return;
        }

        tickets.SrvTickets service = new tickets.SrvTickets();
        tickets.TicketDAO  dao     = new tickets.TicketDAO();
        dao.Description = tDescription.Text;
        dao.Status      = tickets.TicketStatus.CLOSED;
        dao.CompanyID   = objCompany.SZ_COMPANY_ID;
        dao.TicketID    = Convert.ToInt64(this.htid.Get("tid").ToString());

        tickets.TicketDAO retDao = service.AddTicketThread(dao);

        if (retDao != null)
        {
            try
            {
                int i = SendEmail(dao.TicketID);
                lblMessage.Text    = (string)GetLocalResourceObject("tickets.OnClose.success");
                lblMessage.Visible = true;
                BindThreads(dao);
                BindTicketList();
                ResetControls();
                btnReply.Enabled = false;
            }
            catch (Exception o)
            {
                lblErrorMessage.Text    = (string)GetLocalResourceObject("tickets.OnUserReply.email.failed");
                lblErrorMessage.Visible = true;
            }
        }
        else
        {
            lblErrorMessage.Text    = (string)GetLocalResourceObject("tickets.OnNewThread.failed");
            lblErrorMessage.Visible = true;
        }
    }
Beispiel #2
0
    protected void btnClose_Click(object sender, EventArgs e)
    {
        if (!validateFormInput())
        {
            return;
        }

        tickets.SrvTickets service = new tickets.SrvTickets();
        tickets.TicketDAO  dao     = new tickets.TicketDAO();
        dao.Description = tDescription.Text;
        dao.Status      = tickets.TicketStatus.CLOSED;
        dao.CompanyID   = objCompany.SZ_COMPANY_ID;
        dao.TicketID    = Convert.ToInt64(this.htid.Get("tid").ToString());

        tickets.TicketDAO retDao = service.AddTicketThread(dao);

        if (retDao != null)
        {
            try
            {
                int i = SendEmail(dao.TicketID);
                lblMessage.Text    = "The ticket was successfully closed";
                lblMessage.Visible = true;
                BindThreads(dao);
                BindTicketList();
                ResetControls();
                btnReply.Enabled = false;
            }
            catch (Exception o)
            {
                lblErrorMessage.Text    = "Oops! Your ticket updates were successfully posted but there was some technical problem sending out emails. Please contact administrator for assistance";
                lblErrorMessage.Visible = true;
            }
        }
        else
        {
            lblErrorMessage.Text    = "Oops! Some technical problem occurred while replying to the ticket. Please contact adminisrator for assistance.";
            lblErrorMessage.Visible = true;
        }
    }