Beispiel #1
0
        /// <summary>
        /// Envia los cambios del tfi_ValoresDatosAuxiliaresDataset a la base de datos.
        /// </summary>
        public static void Update(tfi_ValoresDatosAuxiliaresDataset dataSet)
        {
            ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber);
            ApplicationAssert.Check(dataSet.tfi_ValoresDatosAuxiliares.Rows.Count > 0, "La tabla dataSet.tfi_ValoresDatosAuxiliaresDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber);

            mz.erp.dataaccess.tfi_ValoresDatosAuxiliares.Update(dataSet);
        }
Beispiel #2
0
        public static tfi_ValoresDatosAuxiliaresDataset GetList(string IdValor)
        {
            tfi_ValoresDatosAuxiliaresDataset data = new tfi_ValoresDatosAuxiliaresDataset();

            SqlDataAdapter adapter = new SqlDataAdapter();

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

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

            cmd.CommandType = CommandType.StoredProcedure;

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

            adapter.SelectCommand = cmd;

            adapter.Fill(data);

            return(data);
        }
Beispiel #3
0
        public static tfi_ValoresDatosAuxiliaresDataset.tfi_ValoresDatosAuxiliaresRow GetByPk(string IdValor)
        {
            tfi_ValoresDatosAuxiliaresDataset data = new tfi_ValoresDatosAuxiliaresDataset();

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

            cmd.CommandType = CommandType.StoredProcedure;

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

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

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

            adapter.Fill(data);

            if (data.tfi_ValoresDatosAuxiliares.Rows.Count == 1)
            {
                return((tfi_ValoresDatosAuxiliaresDataset.tfi_ValoresDatosAuxiliaresRow)data.tfi_ValoresDatosAuxiliares.Rows[0]);
            }

            return(null);
        }
Beispiel #4
0
        public static tfi_ValoresDatosAuxiliaresDataset GetList()
        {
            tfi_ValoresDatosAuxiliaresDataset data = new tfi_ValoresDatosAuxiliaresDataset();

            return(( tfi_ValoresDatosAuxiliaresDataset )GetList(data));
        }
Beispiel #5
0
 public static void Update(tfi_ValoresDatosAuxiliaresDataset dataSet)
 {
     Update(dataSet.tfi_ValoresDatosAuxiliares);
 }