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

            mz.erp.dataaccess.tsy_FormasDePago.Update(dataSet);
        }
コード例 #2
0
        public static DataSet GetList([SearchParameterInfo("IdFormaDePago")] string IdFormaDePago,
                                      [SearchParameterInfo("Descripcion")] string Descripcion,
                                      [SearchParameterInfo("Activo")] bool Activo,
                                      [SearchParameterInfo("Sistema")] bool Sistema,
                                      [SearchParameterInfo("MaximoPorcentaje")] decimal MaximoPorcentaje,
                                      [SearchParameterInfo("MaximoMontoFijo")] decimal MaximoMontoFijo,
                                      [SearchParameterInfo("IdTasaDeCambio")] long IdTasaDeCambio,
                                      [SearchParameterInfo("FechaCreacion")] DateTime FechaCreacion,
                                      [SearchParameterInfo("IdConexionCreacion")] long IdConexionCreacion,
                                      [SearchParameterInfo("UltimaModificacion")] byte[] UltimaModificacion,
                                      [SearchParameterInfo("IdConexionUltimaModificacion")] long IdConexionUltimaModificacion,
                                      [SearchParameterInfo("IdReservado")] long IdReservado,
                                      [SearchParameterInfo("RowId")] Guid RowId,
                                      [SearchParameterInfo("IdEmpresa")] long IdEmpresa
                                      )
        {
            tsy_FormasDePagoDataset data = mz.erp.businessrules.tsy_FormasDePago.GetList(IdFormaDePago, Descripcion, Activo, Sistema, MaximoPorcentaje, MaximoMontoFijo, IdTasaDeCambio, FechaCreacion, IdConexionCreacion, UltimaModificacion, IdConexionUltimaModificacion, IdReservado, RowId, IdEmpresa);

            return(( DataSet )data);
        }
コード例 #3
0
        public static tsy_FormasDePagoDataset.tsy_FormasDePagoRow GetByPk(string IdFormaDePago)
        {
            tsy_FormasDePagoDataset data = new tsy_FormasDePagoDataset();

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

            cmd.CommandType = CommandType.StoredProcedure;

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

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

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

            adapter.Fill(data);

            if (data.tsy_FormasDePago.Rows.Count == 1)
            {
                return((tsy_FormasDePagoDataset.tsy_FormasDePagoRow)data.tsy_FormasDePago.Rows[0]);
            }

            return(null);
        }
コード例 #4
0
        public static tsy_FormasDePagoDataset GetList(string IdFormaDePago, string Descripcion, bool Activo, bool Sistema, decimal MaximoPorcentaje, decimal MaximoMontoFijo, long IdTasaDeCambio, DateTime FechaCreacion, long IdConexionCreacion, byte[] UltimaModificacion, long IdConexionUltimaModificacion, long IdReservado, Guid RowId, long IdEmpresa)
        {
            tsy_FormasDePagoDataset data = new tsy_FormasDePagoDataset();

            SqlDataAdapter adapter = new SqlDataAdapter();

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

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

            cmd.CommandType = CommandType.StoredProcedure;

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

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

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

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

            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("@IdTasaDeCambio", SqlDbType.BigInt));
            cmd.Parameters["@IdTasaDeCambio"].Value = IdTasaDeCambio;

            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);
        }
コード例 #5
0
        public static tsy_FormasDePagoDataset GetList()
        {
            tsy_FormasDePagoDataset data = new tsy_FormasDePagoDataset();

            return(( tsy_FormasDePagoDataset )GetList(data));
        }
コード例 #6
0
 public static void Update(tsy_FormasDePagoDataset dataSet)
 {
     Update(dataSet.tsy_FormasDePago);
 }