Esempio n. 1
0
        public bool UpdateServiceOrder(ServiceOrder serviceOrder)
        {
            try
            {
                context.OrdensServico.Update(serviceOrder);
                context.SaveChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }
Esempio n. 2
0
        public bool DeleteServiceOrder(int serviceOrderId)
        {
            ServiceOrder so = context.OrdensServico.Find(serviceOrderId);

            try
            {
                context.OrdensServico.Remove(so);
                context.SaveChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }