Example #1
0
 void CheckNull(Ticket ticket)
 {
     if (null == ticket)
     {
         throw new ArgumentNullException("id error, not product");
     }
 }
Example #2
0
        public void Edit(string id, Ticket ticketNew)
        {
            //si no existe producto, lanza excepcion
            var checknull = Get(id);
            CheckNull(checknull);

            int _id = Int32.Parse(id);
            _service.Edit(_id, ticketNew);
            Save();
        }
Example #3
0
 public void Add(Ticket ticket)
 {
     _service.Add(ticket);
     Save();
 }