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

            mz.erp.dataaccess.tsy_EstadosDevoluciones.Update(dataSet);
        }
Esempio n. 2
0
        public static tsy_EstadosDevolucionesDataset GetList(long IdEstadoDevolucion, string Descripcion, DateTime FechaCreacion, long IdConexionCreacion, byte[] UltimaModificacion, long IdConexionUltimaModificacion, long IdReservado, Guid RowId, long IdEmpresa)
        {
            tsy_EstadosDevolucionesDataset data = new tsy_EstadosDevolucionesDataset();

            SqlDataAdapter adapter = new SqlDataAdapter();

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

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

            cmd.CommandType = CommandType.StoredProcedure;

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

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

            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);
        }
Esempio n. 3
0
        public static tsy_EstadosDevolucionesDataset.tsy_EstadosDevolucionesRow GetByPk(long IdEstadoDevolucion)
        {
            tsy_EstadosDevolucionesDataset data = new tsy_EstadosDevolucionesDataset();

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

            cmd.CommandType = CommandType.StoredProcedure;

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

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

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

            adapter.Fill(data);

            if (data.tsy_EstadosDevoluciones.Rows.Count == 1)
            {
                return((tsy_EstadosDevolucionesDataset.tsy_EstadosDevolucionesRow)data.tsy_EstadosDevoluciones.Rows[0]);
            }

            return(null);
        }
Esempio n. 4
0
        public static tsy_EstadosDevolucionesDataset GetList()
        {
            tsy_EstadosDevolucionesDataset data = new tsy_EstadosDevolucionesDataset();

            return(( tsy_EstadosDevolucionesDataset )GetList(data));
        }
Esempio n. 5
0
 public static void Update(tsy_EstadosDevolucionesDataset dataSet)
 {
     Update(dataSet.tsy_EstadosDevoluciones);
 }