Example #1
0
 public Afiliado getAfiliado()
 {
     SqlRunner runner = new SqlRunner(Properties.Settings.Default.GD2C2013ConnectionString);
     var result = runner
             .Single("SELECT * FROM SIGKILL.afiliado WHERE afil_usuario={0}",this.usr_id.ToString());
     return new Adapter().Transform<Afiliado>(result);
 }
Example #2
0
 public Profesional getProfesional()
 {
     SqlRunner runner = new SqlRunner(Properties.Settings.Default.GD2C2013ConnectionString);
     var result = runner
             .Single("SELECT * FROM SIGKILL.profesional WHERE pro_usuario={0}", this.usr_id.ToString());
     return new Adapter().Transform<Profesional>(result);
 }
        private void frmListadoRoles_Load(object sender, EventArgs e)
        {
            SqlRunner runner = new SqlRunner(Properties.Settings.Default.GD2C2013ConnectionString);
            try
            {
                var result = runner
                    .Select("SELECT * FROM SIGKILL.rol");
                var rolFromDb = new Adapter().TransformMany<Rol>(result);
                foreach (var rol in rolFromDb)
                {
                    comboBox1.Items.Add(rol.rol_nombre);
                }

            }
            catch
            {
                MessageBox.Show("Error de rol");
            }
        }