Example #1
0
        public static TymVturnaji MapResultsetToObject(DataRow dr)
        {
            TymVturnaji tvt = new TymVturnaji();

            tvt.tym    = Tym.MapResultsetToObject(Tym.FindD(Convert.ToInt32(dr.ItemArray[0].ToString())).Rows[0]);
            tvt.turnaj = Turnaj.MapResultsetToObject(Turnaj.FindD(Convert.ToInt32(dr.ItemArray[1].ToString())).Rows[0]);

            return(tvt);
        }
Example #2
0
 public Zapas(int _id, int _skore1, int _skore2, Turnaj _turnaj, Tym _tym1, Tym _tym2, Tym _tymVitez)
 {
     ID       = _id;
     skore1   = _skore1;
     skore2   = _skore2;
     turnaj   = _turnaj;
     tym1     = _tym1;
     tym2     = _tym2;
     tymVitez = _tymVitez;
 }
Example #3
0
        public static Turnaj Find(int _id)
        {
            Turnaj turnaj = new Turnaj();

            DataTable dt = Turnaj.FindD(_id);

            turnaj = MapResultsetToObject(dt.Rows[0]);

            return(turnaj);
        }
Example #4
0
        public static List <Turnaj> Find()
        {
            List <Turnaj> turnajList = new List <Turnaj>();

            DataTable dt = new Turnaj().FindD();

            foreach (DataRow dr in dt.Rows)
            {
                turnajList.Add(MapResultsetToObject(dr));
            }

            return(turnajList);
        }
Example #5
0
        public static Zapas MapResultsetToObject(DataRow dr)
        {
            Zapas zapas = new Zapas();

            zapas.ID       = Convert.ToInt32(dr.ItemArray[0].ToString());
            zapas.skore1   = Convert.ToInt32(dr.ItemArray[1].ToString());
            zapas.skore2   = Convert.ToInt32(dr.ItemArray[2].ToString());
            zapas.turnaj   = Turnaj.MapResultsetToObject(Turnaj.FindD(Convert.ToInt32(dr.ItemArray[3].ToString())).Rows[0]);
            zapas.tym1     = Tym.MapResultsetToObject(Tym.FindD(Convert.ToInt32(dr.ItemArray[4].ToString())).Rows[0]);
            zapas.tym2     = Tym.MapResultsetToObject(Tym.FindD(Convert.ToInt32(dr.ItemArray[5].ToString())).Rows[0]);
            zapas.tymVitez = Tym.MapResultsetToObject(Tym.FindD(Convert.ToInt32(dr.ItemArray[6].ToString())).Rows[0]);

            return(zapas);
        }
Example #6
0
        public static Turnaj MapResultsetToObject(DataRow dr)
        {
            Turnaj turnaj = new Turnaj();

            turnaj.ID          = Convert.ToInt32(dr.ItemArray[0].ToString());
            turnaj.nazev       = dr.ItemArray[1].ToString();
            turnaj.datumOD     = Convert.ToDateTime(dr.ItemArray[2].ToString());
            turnaj.datumDO     = Convert.ToDateTime(dr.ItemArray[3].ToString());
            turnaj.prizepool   = Convert.ToInt32(dr.ItemArray[4].ToString());
            turnaj.misto       = dr.ItemArray[5].ToString();
            turnaj.zeme        = dr.ItemArray[6].ToString();
            turnaj.organizator = Organizator.MapResultsetToObject(Organizator.FindD(Convert.ToInt32(dr.ItemArray[7].ToString())).Rows[0]);

            return(turnaj);
        }
Example #7
0
 public TymVturnaji(Tym _tym, Turnaj _turnaj)
 {
     tym    = _tym;
     turnaj = _turnaj;
 }