Esempio n. 1
0
        private void LoadTicketConversation()
        {
            Guid ticketId = new Guid(Request["ticketId"]);
            //  Ticket tic = new Ticket();
            var dt = GetTicketData(ticketId);

            TicketNumber = FormatTicketNumber(dt.Rows[0]["TicketNumber"].ToString());
            Subject      = dt.Rows[0]["Subject"].ToString();

            ddlStatus.SelectedValue   = dt.Rows[0]["Status"].ToString();
            ddlPriority.SelectedValue = dt.Rows[0]["Priority"].ToString();
            CreatedOn  = ((DateTime)dt.Rows[0]["InsertDate"]).ToString("dd MMMM yyyy HH:mm:ss tt");
            UpdatedOn  = ((DateTime)dt.Rows[0]["LastUpdate"]).ToString("dd MMMM yyyy HH:mm:ss tt");
            TicketType = GetTicketType(dt.Rows[0]["Type"].ToString());
            Department = GetDepartment(dt.Rows[0]["Department"]);

            Customer cus = new Customer();
            //if(cus.GetCustomerDetailByUserName(dt.Rows[0]["UserEmail"].ToString()))
            //{
            //userName = cus.CusInfo.Name;
            //}
            //else{
            //userName = dt.Rows[0]["UserName"].ToString();
            //if (userName.Trim().Length  < 1)
            //{
            //    userName = dt.Rows[0]["UserEmail"].ToString();
            //}
            //}

            TicketConversation ticConv = new TicketConversation();
            var dt1 = ticConv.GetConversion(dt.Rows[0]["UserEmail"].ToString(), ticketId);

            Repeater1.DataSource = dt1;
            Repeater1.DataBind();
        }
Esempio n. 2
0
        private void LoadTicket()
        {
            //TO DO: Validate User aganist ticket number to disaalow user to view other people ticket
            // TO DO: SP for insert ticket

            Guid   ticketId = new Guid(Request["ticketId"]);
            Ticket tic      = new Ticket();
            var    dt       = tic.GetUserTicket(ticketId);

            TicketNumber = FormatTicketNumber(dt.Rows[0]["TicketNumber"].ToString());
            Subject      = dt.Rows[0]["Subject"].ToString();
            UserEmail    = dt.Rows[0]["UserEmail"].ToString();

            //ddlStatus.SelectedValue = dt.Rows[0]["Status"].ToString();
            //ddlPriority.SelectedValue = dt.Rows[0]["Priority"].ToString();
            //CreatedOn = ((DateTime)dt.Rows[0]["InsertDate"]).ToString("dd MMMM yyyy HH:mm:ss tt");
            //UpdatedOn = ((DateTime)dt.Rows[0]["LastUpdate"]).ToString("dd MMMM yyyy HH:mm:ss tt");
            //TicketType = GetTicketType(dt.Rows[0]["Type"].ToString());


            TicketConversation ticConv = new TicketConversation();
            var dt1 = ticConv.GetConversion(ticketId);

            Message = dt1.Rows[0]["Message"].ToString();

            SendEmail();
        }