public static tsa_CuentasFormasDePagoDataset.tsa_CuentasFormasDePagoRow GetByPk(string IdCuenta, string IdFormaPago) { tsa_CuentasFormasDePagoDataset data = new tsa_CuentasFormasDePagoDataset(); SqlCommand cmd = new SqlCommand("Pr_tsa_CuentasFormasDePago_GetByPk", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdCuenta", SqlDbType.VarChar)); cmd.Parameters["@IdCuenta"].Value = IdCuenta; cmd.Parameters.Add(new SqlParameter("@IdFormaPago", SqlDbType.VarChar)); cmd.Parameters["@IdFormaPago"].Value = IdFormaPago; SqlDataAdapter adapter = new SqlDataAdapter(cmd); adapter.TableMappings.Add("Table", "tsa_CuentasFormasDePago"); adapter.Fill(data); if (data.tsa_CuentasFormasDePago.Rows.Count == 1) { return((tsa_CuentasFormasDePagoDataset.tsa_CuentasFormasDePagoRow)data.tsa_CuentasFormasDePago.Rows[0]); } return(null); }
/// <summary> /// Envia los cambios del tsa_CuentasFormasDePagoDataset a la base de datos. /// </summary> public static void Update(tsa_CuentasFormasDePagoDataset dataSet) { ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber); ApplicationAssert.Check(dataSet.tsa_CuentasFormasDePago.Rows.Count > 0, "La tabla dataSet.tsa_CuentasFormasDePagoDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber); mz.erp.dataaccess.tsa_CuentasFormasDePago.Update(dataSet); }
public static tsa_CuentasFormasDePagoDataset GetList(string IdCuenta, string IdFormaPago, bool Activo, decimal MaximoPorcentaje, decimal MaximoMontoFijo, DateTime FechaCreacion, long IdConexionCreacion, byte[] UltimaModificacion, long IdConexionUltimaModificacion, long IdReservado, Guid RowId, long IdSucursal, long IdEmpresa) { tsa_CuentasFormasDePagoDataset data = new tsa_CuentasFormasDePagoDataset(); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.TableMappings.Add("Table", "tsa_CuentasFormasDePago"); SqlCommand cmd = new SqlCommand("Pr_tsa_CuentasFormasDePago_Search", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdCuenta", SqlDbType.VarChar)); cmd.Parameters["@IdCuenta"].Value = IdCuenta; cmd.Parameters.Add(new SqlParameter("@IdFormaPago", SqlDbType.VarChar)); cmd.Parameters["@IdFormaPago"].Value = IdFormaPago; cmd.Parameters.Add(new SqlParameter("@Activo", SqlDbType.Bit)); cmd.Parameters["@Activo"].Value = Activo; cmd.Parameters.Add(new SqlParameter("@MaximoPorcentaje", SqlDbType.Decimal)); cmd.Parameters["@MaximoPorcentaje"].Value = MaximoPorcentaje; cmd.Parameters.Add(new SqlParameter("@MaximoMontoFijo", SqlDbType.Decimal)); cmd.Parameters["@MaximoMontoFijo"].Value = MaximoMontoFijo; 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("@IdSucursal", SqlDbType.BigInt)); cmd.Parameters["@IdSucursal"].Value = IdSucursal; cmd.Parameters.Add(new SqlParameter("@IdEmpresa", SqlDbType.BigInt)); cmd.Parameters["@IdEmpresa"].Value = IdEmpresa; adapter.SelectCommand = cmd; adapter.Fill(data); return(data); }
public static tsa_CuentasFormasDePagoDataset GetList() { tsa_CuentasFormasDePagoDataset data = new tsa_CuentasFormasDePagoDataset(); return(( tsa_CuentasFormasDePagoDataset )GetList(data)); }
public static void Update(tsa_CuentasFormasDePagoDataset dataSet) { Update(dataSet.tsa_CuentasFormasDePago); }