public bool UpdateStudenti(int id_c, string name, string prenume, string email, string tel, string grad, int camera, string functie, int code)
        {
            if (code == 0)
                return false;

            using (var context = new ServiciiATMContext())
            {
                using (var transaction = context.Database.BeginTransaction())
                {
                    try
                    {
                        var serv = new Studenti
                        {
                            ID_C = id_c,
                            Nume = name,
                            Prenume = prenume,
                            Email = email,
                            Nr_tel = tel,
                            Grad_militar = grad,
                            Camera = camera,
                            Functie = functie

                        };
                        context.Studentis.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 InsertStudenti(int id_c, string nume, string prenume, string mail, string tel, string grad, int camera, string functie, int code)
        {
            if (code == 0)
                return false;
            using (var context = new ServiciiATMContext())
            {
                var student = new Studenti
                {
                    ID_C = id_c,
                    Nume = nume,
                    Prenume = prenume,
                    Email = mail,
                    Nr_tel = tel,
                    Grad_militar = grad,
                    Camera = camera,
                    Functie = functie,

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

                return true;
            }

        }