public bool UpdateInvoireApel(int id_s, DateTime data, TimeSpan ora_plecare, TimeSpan ora_sosire, int code)
        {
            if (code == 0)
                return false;

            using (var context = new ServiciiATMContext())
            {
                using (var transaction = context.Database.BeginTransaction())
                {
                    try
                    {
                        var serv = new Invoire_apel
                        {
                            ID_S = id_s,
                            Data = data,
                            Ora_plecare = ora_plecare,
                            Ora_sosire = ora_sosire

                        };
                        context.Invoire_apel.Add(serv);
                        context.Entry(serv).State = System.Data.Entity.EntityState.Modified;
                        context.SaveChanges();
                        transaction.Commit();
                        return true;
                    }
                    catch (Exception ex)
                    {
                        transaction.Rollback();
                        return false;
                    }
                }
            }
        }
        public bool InsertInvoireSeara(int id_s, DateTime data, TimeSpan ora_plecare, TimeSpan ora_sosire, int code)
        {
            if (code == 0)
                return false;
            using (var context = new ServiciiATMContext())
            {
                var invoire = new Invoire_apel
                {
                    ID_S = id_s,
                    Ora_plecare = ora_plecare,
                    Ora_sosire = ora_sosire,
                    Data = data,

                };
                context.Invoire_apel.Add(invoire);
                context.Entry(invoire).State = System.Data.Entity.EntityState.Added;
                context.SaveChanges();

                return true;
            }

        }