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

            mz.erp.dataaccess.tsh_ProductosCoeficientesAplicados.Update(dataSet);
        }
Exemplo n.º 2
0
        public static tsh_ProductosCoeficientesAplicadosDataset GetList(string IdProducto, string IdCoeficienteCostoIndirecto1, string IdCoeficienteCostoIndirecto2, string IdCoeficienteCostoIndirecto3, string IdCoeficienteCostoIndirecto4, string IdCoeficienteCostoIndirecto5, string IdCoeficienteCostoIndirecto6, string IdCoeficienteCostoIndirecto7, string IdCoeficienteCostoIndirecto8, string IdCoeficienteCostoIndirecto9, string IdCoeficienteCostoIndirecto10)
        {
            tsh_ProductosCoeficientesAplicadosDataset data = new tsh_ProductosCoeficientesAplicadosDataset();

            SqlDataAdapter adapter = new SqlDataAdapter();

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

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

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add(new SqlParameter("@IdProducto", SqlDbType.VarChar));
            cmd.Parameters["@IdProducto"].Value = IdProducto;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto1", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto1"].Value = IdCoeficienteCostoIndirecto1;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto2", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto2"].Value = IdCoeficienteCostoIndirecto2;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto3", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto3"].Value = IdCoeficienteCostoIndirecto3;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto4", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto4"].Value = IdCoeficienteCostoIndirecto4;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto5", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto5"].Value = IdCoeficienteCostoIndirecto5;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto6", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto6"].Value = IdCoeficienteCostoIndirecto6;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto7", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto7"].Value = IdCoeficienteCostoIndirecto7;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto8", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto8"].Value = IdCoeficienteCostoIndirecto8;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto9", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto9"].Value = IdCoeficienteCostoIndirecto9;
            cmd.Parameters.Add(new SqlParameter("@IdCoeficienteCostoIndirecto10", SqlDbType.VarChar));
            cmd.Parameters["@IdCoeficienteCostoIndirecto10"].Value = IdCoeficienteCostoIndirecto10;
            adapter.SelectCommand = cmd;

            adapter.Fill(data);

            return(data);
        }
Exemplo n.º 3
0
        public static tsh_ProductosCoeficientesAplicadosDataset.tsh_ProductosCoeficientesAplicadosRow GetByPk(string IdProducto)
        {
            tsh_ProductosCoeficientesAplicadosDataset data = new tsh_ProductosCoeficientesAplicadosDataset();

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

            cmd.CommandType = CommandType.StoredProcedure;

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

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

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

            adapter.Fill(data);

            if (data.tsh_ProductosCoeficientesAplicados.Rows.Count == 1)
            {
                return((tsh_ProductosCoeficientesAplicadosDataset.tsh_ProductosCoeficientesAplicadosRow)data.tsh_ProductosCoeficientesAplicados.Rows[0]);
            }

            return(null);
        }
Exemplo n.º 4
0
        public static tsh_ProductosCoeficientesAplicadosDataset GetList()
        {
            tsh_ProductosCoeficientesAplicadosDataset data = new tsh_ProductosCoeficientesAplicadosDataset();

            return(( tsh_ProductosCoeficientesAplicadosDataset )GetList(data));
        }
Exemplo n.º 5
0
 public static void Update(tsh_ProductosCoeficientesAplicadosDataset dataSet)
 {
     Update(dataSet.tsh_ProductosCoeficientesAplicados);
 }