public DataSet getticketnodehistory(string ticketid) { TicketDao ticketdao = new TicketDao(); Ticket ticket = ticketdao.getticketid(ticketid); ConnectionDao ConnectionDao = new ConnectionDao(); SqlDataAdapter adp = new SqlDataAdapter("select * from TicketNote where ticketid='" + ticket.ticketgetid + "'", ConnectionDao.getConnection()); DataSet ds2 = new DataSet(); adp.Fill(ds2); return ds2; }
public string TicketAdd(Ticket ticket) { SqlConnection conn = null; SqlTransaction trans = null; string returnString = IdProConstants.SUCCESS; TicketDao ticketdao = new TicketDao(); ConnectionDao ConnectionDao = new ConnectionDao(); try { conn = ConnectionDao.getConnection(); trans = conn.BeginTransaction(); //ticket.tickettypeid = ticketdao.addticketsTypedetail(conn, trans, ticket); //if (!ticket.tickettypeid.Equals(0)) //{ ticket.ticketid = ticketdao.addticketsdetail(conn, trans, ticket); if (!ticket.ticketid.Equals(0)) { ticket.noteid = ticketdao.addticketsNotedetail(conn, trans, ticket); if (!ticket.noteid.Equals(0)) { returnString = ticketdao.addticketsAssignment(conn, trans, ticket); } else { trans.Commit(); } } else { trans.Rollback(); } trans.Commit(); } //else //{ // trans.Rollback(); //} //} catch (Exception exception) { trans.Rollback(); System.Diagnostics.Trace.WriteLine("[EmployeeServices:addEmployee] Exception " + exception.StackTrace); } finally { ConnectionDao.closeConnection(conn); } return returnString; }
public DataSet getticketassignmenthistory(string ticketid) { TicketDao ticketdao = new TicketDao(); Ticket ticket = ticketdao.getticketid(ticketid); ConnectionDao ConnectionDao = new ConnectionDao(); SqlDataAdapter adp = new SqlDataAdapter("select * from TicketAssignment where ticketid='" + ticket.ticketgetid + "'", ConnectionDao.getConnection()); DataSet ds3 = new DataSet(); adp.Fill(ds3); return ds3; }