Beispiel #1
0
        public void Delete(Zone zone)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Zones.Remove(zone);
            context.SaveChanges();
        }
Beispiel #2
0
        public void Update(Zone zone)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Zones.Update(zone);
            context.SaveChanges();
        }
        public void Update(Client client)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Clients.Update(client);
            context.SaveChanges();
        }
Beispiel #4
0
        public void Insert(Profile profile)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Profiles.Add(profile);
            context.SaveChanges();
        }
        public void Insert(Client client)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Clients.Add(client);
            context.SaveChanges();
        }
        public List <Client> GetActiveClients()
        {
            BillingSystemContext context = new BillingSystemContext();

            // context.Clients
            throw new NotImplementedException();
        }
Beispiel #7
0
        public void Update(Profile profile)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Profiles.Update(profile);
            context.SaveChanges();
        }
Beispiel #8
0
        public void Delete(Profile profile)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Profiles.Remove(profile);
            context.SaveChanges();
        }
        public void Delete(Client client)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Clients.Remove(client);
            context.SaveChanges();
        }
Beispiel #10
0
        public void Insert(Zone zone)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Zones.Add(zone);
            context.SaveChanges();
        }
        public void Delete(Tariff tariff)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Tariffs.Remove(tariff);
            context.SaveChanges();
        }
        public void Update(Tariff tariff)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Tariffs.Update(tariff);
            context.SaveChanges();
        }
        public void Insert(Tariff tariff)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Tariffs.Add(tariff);
            context.SaveChanges();
        }
        public List <Client> GetAll()
        {
            // Create an instance of the context
            BillingSystemContext context = new BillingSystemContext();

            // Get the clients and return them
            return(context.Clients.Include(c => c.ClientTarif).Include(c => c.ClientZone).ToList());
        }
Beispiel #15
0
        public List <Profile> GetAll()
        {
            BillingSystemContext context = new BillingSystemContext();

            return(context.Profiles.ToList());
        }
        public List <Client> Filter(Func <Client, bool> Condition)
        {
            BillingSystemContext context = new BillingSystemContext();

            return(context.Clients.Where(Condition).ToList());
        }
Beispiel #17
0
        public Profile Details(int ID)
        {
            BillingSystemContext context = new BillingSystemContext();

            return(context.Profiles.FirstOrDefault(p => p.IDNumber == ID));
        }
        public Tariff Details(int ID)
        {
            BillingSystemContext context = new BillingSystemContext();

            return(context.Tariffs.FirstOrDefault(t => t.IDNumber == ID));
        }
        public List <Tariff> GetAll()
        {
            BillingSystemContext context = new BillingSystemContext();

            return(context.Tariffs.ToList());
        }
        public Client Details(int ID)
        {
            BillingSystemContext context = new BillingSystemContext();

            return(context.Clients.FirstOrDefault(c => c.IDNumber == ID));
        }
Beispiel #21
0
        public List <Zone> GetAll()
        {
            BillingSystemContext context = new BillingSystemContext();

            return(context.Zones.ToList());
        }