Пример #1
0
        public static ConexionDataset.ConexionRow GetByPk(long IdConexion)
        {
            ConexionDataset data = new ConexionDataset();

            SqlCommand cmd = new SqlCommand("Pr_Conexion_GetByPk", dbhelper.Connection.GetConnection());

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add(new SqlParameter("@IdConexion", SqlDbType.BigInt));
            cmd.Parameters["@IdConexion"].Value = IdConexion;

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

            adapter.TableMappings.Add("Table", "Conexion");

            adapter.Fill(data);

            if (data.Conexion.Rows.Count == 1)
            {
                return((ConexionDataset.ConexionRow)data.Conexion.Rows[0]);
            }

            return(null);
        }
Пример #2
0
 public static void Update(ConexionDataset dataSet)
 {
     Update(dataSet.Conexion);
 }
Пример #3
0
        public static ConexionDataset GetList()
        {
            ConexionDataset data = new ConexionDataset();

            return(( ConexionDataset )GetList(data));
        }