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

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

            context.Zones.Update(zone);
            context.SaveChanges();
        }
예제 #3
0
        public void Update(Client client)
        {
            BillingSystemContext context = new BillingSystemContext();

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

            context.Profiles.Add(profile);
            context.SaveChanges();
        }
예제 #5
0
        public void Insert(Client client)
        {
            BillingSystemContext context = new BillingSystemContext();

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

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

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

            context.Profiles.Remove(profile);
            context.SaveChanges();
        }
예제 #9
0
        public void Delete(Client client)
        {
            BillingSystemContext context = new BillingSystemContext();

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

            context.Zones.Add(zone);
            context.SaveChanges();
        }
예제 #11
0
        public void Delete(Tariff tariff)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Tariffs.Remove(tariff);
            context.SaveChanges();
        }
예제 #12
0
        public void Update(Tariff tariff)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Tariffs.Update(tariff);
            context.SaveChanges();
        }
예제 #13
0
        public void Insert(Tariff tariff)
        {
            BillingSystemContext context = new BillingSystemContext();

            context.Tariffs.Add(tariff);
            context.SaveChanges();
        }
예제 #14
0
        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());
        }
예제 #15
0
        public List <Profile> GetAll()
        {
            BillingSystemContext context = new BillingSystemContext();

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

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

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

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

            return(context.Tariffs.ToList());
        }
예제 #20
0
        public Client Details(int ID)
        {
            BillingSystemContext context = new BillingSystemContext();

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

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