コード例 #1
0
        public Zones GetZones()
        {
            ZoneDao zoneDao = new ZoneDao();
            Zones   zones   = new Zones();

            zones.zones = zoneDao.GetAll();

            return(zones);
        }
コード例 #2
0
        public void DeleteZone(int id)
        {
            BillingSystemContext context = new BillingSystemContext();

            Zone zone = context.Zones.FirstOrDefault(z => z.IDNumber == id);

            ZoneDao dao = new ZoneDao();

            dao.Delete(zone);
        }
コード例 #3
0
        public ZonesAndTariffs GetZonesAndTariffs()
        {
            ZoneDao         zoneDao         = new ZoneDao();
            TariffDao       tariffDao       = new TariffDao();
            ZonesAndTariffs zonesAndTariffs = new ZonesAndTariffs();

            zonesAndTariffs.Tariffs = tariffDao.GetAll();
            zonesAndTariffs.Zones   = zoneDao.GetAll();
            return(zonesAndTariffs);
        }
コード例 #4
0
        public AppointmentsController(IHostingEnvironment env)
        {
            _env = env;
            string WwwPath = _env.WebRootPath;

            Streets = new StreetDao(WwwPath);
            Zones   = new ZoneDao(WwwPath);
            YellowWasteAppointments   = new YellowWasteAppointmentsDao(WwwPath);
            BlueWasteAppointments     = new BlueWasteAppointmentDao(WwwPath);
            ResidualWasteAppointments = new ResidualWasteAppointmentDao(WwwPath);
            BabyWasteAppointments     = new BabyWasteAppointmentsDao(WwwPath);
        }
コード例 #5
0
        public void Add(
            string Town,
            string Owner)
        {
            BillingSystemContext context = new BillingSystemContext();

            Zone zone = new Zone()
            {
                Town  = Town,
                Owner = Owner
            };

            ZoneDao dao = new ZoneDao();

            dao.Insert(zone);
        }
コード例 #6
0
        public void UpdateZone(
            string Town,
            string Owner,
            int IDNumber)
        {
            BillingSystemContext context = new BillingSystemContext();

            Zone zone = new Zone()
            {
                Town     = Town,
                Owner    = Owner,
                IDNumber = IDNumber
            };
            ZoneDao dao = new ZoneDao();

            dao.Update(zone);
        }
コード例 #7
0
        public IActionResult ViewZone()
        {
            ZoneDao dao = new ZoneDao();

            return(View(dao.GetAll()));
        }
コード例 #8
0
        public Zone GetZone(int id)
        {
            ZoneDao dao = new ZoneDao();

            return(dao.Details(id));
        }