Пример #1
0
        private static GolfJugada Parse(int jugadasId)
        {
            DBTransaction            db     = new DBTransaction();
            Dictionary <string, int> fields = new Dictionary <string, int>();

            fields.Add(nameof(JugadasId), jugadasId);
            DataRow    dr = db.GetDataRow(Entity, fields);
            GolfJugada cg = ConvertToCategoia(dr);

            return(cg);
        }
Пример #2
0
        private static GolfJugada ConvertToCategoia(DataRow dr)
        {
            GolfJugada gj = new GolfJugada();

            if (dr != null)
            {
                gj.JugadasId           = Convert.ToInt32(dr["JugadasId"]);
                gj.CompetidorJornadaId = Convert.ToInt32(dr["CompetidorJornadaId"]);
                gj.HoyoParId           = Convert.ToInt32(dr["HoyoParId"]);
                gj.Golpes        = Convert.ToInt32(dr["Golpes"]);
                gj.FechaRegistro = Convert.ToDateTime(dr["FechaRegistro"]);
                gj.UsuarioId     = Convert.ToInt32(dr["UsuarioId"]);
            }
            return(gj);
        }