Exemple #1
0
 public List <Ticket> SelectLimit(int offset, int limit)
 {
     try
     {
         using (var db = new HelpDeskDbContext())
         {
             var sql = from o in db.Tickets where o.DetailCategory.StartsWith("Transfer Asset") && o.StatusTicket != "Closed" select o;
             return(sql.OrderBy(o => o.StartDate).Skip(offset).Take(limit).ToList());
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 public Ticket Select(string ticketId)
 {
     try
     {
         using (var db = new HelpDeskDbContext())
         {
             var sql = from o in db.Tickets where o.TicketId == ticketId select o;
             return(sql.Single());
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #3
0
 public List <Ticket> SelectAll()
 {
     try
     {
         using (var db = new HelpDeskDbContext())
         {
             var sql = from o in db.Tickets where o.DetailCategory.StartsWith("Transfer Asset") && o.StatusTicket != "Closed" select o;
             return(sql.ToList());
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }