示例#1
0
        public static VariablesPerfilesDataset.VariablesPerfilesRow GetByPk(long IdVariable, long IdPerfil)
        {
            VariablesPerfilesDataset data = new VariablesPerfilesDataset();

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

            cmd.CommandType = CommandType.StoredProcedure;

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

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

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

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

            adapter.Fill(data);

            if (data.VariablesPerfiles.Rows.Count == 1)
            {
                return((VariablesPerfilesDataset.VariablesPerfilesRow)data.VariablesPerfiles.Rows[0]);
            }

            return(null);
        }
示例#2
0
 public static void Update(VariablesPerfilesDataset dataSet)
 {
     Update(dataSet.VariablesPerfiles);
 }
示例#3
0
        public static VariablesPerfilesDataset GetList()
        {
            VariablesPerfilesDataset data = new VariablesPerfilesDataset();

            return(( VariablesPerfilesDataset )GetList(data));
        }