示例#1
0
        public static Collection <Asistence> Read(OracleDataReader reader)
        {
            var data = new Collection <Asistence>();

            while (reader.Read())
            {
                int i         = -1;
                var asistence = new Asistence
                {
                    AsistenceId = reader.GetInt32(++i),
                    Hrac        = new Hrac
                    {
                        HracId = reader.GetInt32(++i)
                    },
                    Zapas = new Zapas
                    {
                        ZapasId = reader.GetInt32(++i)
                    },
                    Gol = new Gol
                    {
                        GolId = reader.GetInt32(++i)
                    }
                };
                data.Add(asistence);
            }
            return(data);
        }
示例#2
0
        private void buttAssist_Click(object sender, EventArgs e)
        {
            int hrac = Int32.Parse(textAsistHrac.Text);

            Hrac h = new Hrac()
            {
                HracId = hrac
            };

            Asistence a = new Asistence()
            {
                Hrac = h
            };

            z.ZapisAsistenci(a);

            textAsistHrac.Text = "";
        }
示例#3
0
        public int Insert(Asistence a)
        {
            using (db.GetConnection())
            {
                db.Connect();
                OracleCommand command = db.CreateCommand(insert);
                command.Parameters.AddWithValue(":Hrac", a.Hrac.HracId);

                var zap      = new ZapasyTable();
                int maximumZ = zap.PosledniZapas();
                command.Parameters.AddWithValue(":Zapas", maximumZ);
                //command.Parameters.AddWithValue(":Zapas", a.Zapas.ZapasId);

                var gol      = new GolyTable();
                int maximumG = gol.PosledniGol();
                command.Parameters.AddWithValue(":Gol", maximumG);
                //command.Parameters.AddWithValue(":Gol", a.Gol.GolId);

                int ret = db.ExecuteNonQuery(command);
                return(ret);
            }
        }
示例#4
0
文件: Asistence.cs 项目: monte10/VIS
 public void Pridej(Asistence a)
 {
 }
示例#5
0
        public void ZapisAsistenci(Asistence a)
        {
            AsistenceTable asistenceTable = new AsistenceTable();

            asistenceTable.Insert(a);
        }