/// <summary> /// Envia los cambios del tsa_ComboDetDataset a la base de datos. /// </summary> public static void Update(tsa_ComboDetDataset dataSet) { ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber); ApplicationAssert.Check(dataSet.tsa_ComboDet.Rows.Count > 0, "La tabla dataSet.tsa_ComboDetDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber); mz.erp.dataaccess.tsa_ComboDet.Update(dataSet); }
public static tsa_ComboDetDataset GetList(long IdCombo, string IdProducto, decimal Cantidad, string FormulaCalculoCantidad, byte Orden, DateTime FechaCreacion, long IdConexionCreacion, byte[] UltimaModificacion, long IdConexionUltimaModificacion, long IdReservado, Guid RowId, long IdEmpresa) { tsa_ComboDetDataset data = new tsa_ComboDetDataset(); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.TableMappings.Add("Table", "tsa_ComboDet"); SqlCommand cmd = new SqlCommand("Pr_tsa_ComboDet_Search", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdCombo", SqlDbType.BigInt)); cmd.Parameters["@IdCombo"].Value = IdCombo; cmd.Parameters.Add(new SqlParameter("@IdProducto", SqlDbType.VarChar)); cmd.Parameters["@IdProducto"].Value = IdProducto; cmd.Parameters.Add(new SqlParameter("@Cantidad", SqlDbType.Decimal)); cmd.Parameters["@Cantidad"].Value = Cantidad; cmd.Parameters.Add(new SqlParameter("@FormulaCalculoCantidad", SqlDbType.VarChar)); cmd.Parameters["@FormulaCalculoCantidad"].Value = FormulaCalculoCantidad; cmd.Parameters.Add(new SqlParameter("@Orden", SqlDbType.TinyInt)); cmd.Parameters["@Orden"].Value = Orden; cmd.Parameters.Add(new SqlParameter("@FechaCreacion", SqlDbType.DateTime)); cmd.Parameters["@FechaCreacion"].Value = FechaCreacion; cmd.Parameters.Add(new SqlParameter("@IdConexionCreacion", SqlDbType.BigInt)); cmd.Parameters["@IdConexionCreacion"].Value = IdConexionCreacion; cmd.Parameters.Add(new SqlParameter("@UltimaModificacion", SqlDbType.Timestamp)); cmd.Parameters["@UltimaModificacion"].Value = UltimaModificacion; cmd.Parameters.Add(new SqlParameter("@IdConexionUltimaModificacion", SqlDbType.BigInt)); cmd.Parameters["@IdConexionUltimaModificacion"].Value = IdConexionUltimaModificacion; cmd.Parameters.Add(new SqlParameter("@IdReservado", SqlDbType.BigInt)); cmd.Parameters["@IdReservado"].Value = IdReservado; cmd.Parameters.Add(new SqlParameter("@RowId", SqlDbType.UniqueIdentifier)); cmd.Parameters["@RowId"].Value = RowId; cmd.Parameters.Add(new SqlParameter("@IdEmpresa", SqlDbType.BigInt)); cmd.Parameters["@IdEmpresa"].Value = IdEmpresa; adapter.SelectCommand = cmd; adapter.Fill(data); return(data); }
public static tsa_ComboDetDataset.tsa_ComboDetRow GetByPk(long IdCombo) { tsa_ComboDetDataset data = new tsa_ComboDetDataset(); SqlCommand cmd = new SqlCommand("Pr_tsa_ComboDet_GetByPk", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdCombo", SqlDbType.BigInt)); cmd.Parameters["@IdCombo"].Value = IdCombo; SqlDataAdapter adapter = new SqlDataAdapter(cmd); adapter.TableMappings.Add("Table", "tsa_ComboDet"); adapter.Fill(data); if (data.tsa_ComboDet.Rows.Count == 1) { return((tsa_ComboDetDataset.tsa_ComboDetRow)data.tsa_ComboDet.Rows[0]); } return(null); }
public static tsa_ComboDetDataset GetList() { tsa_ComboDetDataset data = new tsa_ComboDetDataset(); return(( tsa_ComboDetDataset )GetList(data)); }
public static void Update(tsa_ComboDetDataset dataSet) { Update(dataSet.tsa_ComboDet); }