Beispiel #1
0
        public static IdiomasDataset.IdiomasRow GetByPk(long IdIdioma)
        {
            IdiomasDataset data = new IdiomasDataset();

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

            cmd.CommandType = CommandType.StoredProcedure;

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

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

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

            adapter.Fill(data);

            if (data.Idiomas.Rows.Count == 1)
            {
                return((IdiomasDataset.IdiomasRow)data.Idiomas.Rows[0]);
            }

            return(null);
        }
Beispiel #2
0
 public static void Update(IdiomasDataset dataSet)
 {
     Update(dataSet.Idiomas);
 }
Beispiel #3
0
        public static IdiomasDataset GetList()
        {
            IdiomasDataset data = new IdiomasDataset();

            return(( IdiomasDataset )GetList(data));
        }