예제 #1
0
        public Dispeceri(string path)
        {
            path = HostingEnvironment.MapPath(path);
            FileStream   stream = new FileStream(path, FileMode.Open);
            StreamReader sr     = new StreamReader(stream);
            Polovi       pol;
            Uloge        uloga;
            string       line = "";

            while ((line = sr.ReadLine()) != null)
            {
                string[] tokens = line.Split('|');

                if (tokens[5].Equals("M"))
                {
                    pol = Polovi.M;
                }
                else
                {
                    pol = Polovi.Z;
                }
                if (tokens[9].Equals("Musterija"))
                {
                    uloga = Uloge.Musterija;
                }
                else if (tokens[9].Equals("Dispecer"))
                {
                    uloga = Uloge.Dispecer;
                }
                else
                {
                    uloga = Uloge.Vozac;
                }
                Dispecer d = new Dispecer(Int32.Parse(tokens[0]), tokens[1], tokens[2], tokens[3], tokens[4], pol, tokens[6], tokens[7], tokens[8], uloga);
                dispeceri.Add(d.Id, d);
            }

            sr.Close();
            stream.Close();
        }
예제 #2
0
 public Voznja(DateTime _datumVreme, Lokacija _lokacija, TipAutomobila _tipAutomobila, Musterija _musterija, Lokacija _odrediste, Dispecer _dispecer, Vozac _vozac, int _iznos, string _komentar)
 {
     this.Datum_Vreme = _datumVreme;
     this.LokacijaNaKojuDolaziTaxi = _lokacija;
     this.TipAutomobila            = _tipAutomobila;
     this.Musterija    = _musterija;
     this.Odrediste    = _odrediste;
     this.Dispecer     = _dispecer;
     this.Vozac        = _vozac;
     this.Iznos        = _iznos;
     this.Komentar     = _komentar;
     this.StatusVoznje = StatusVoznje.KREIRANA_NA_CEKANJU;
 }