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

            mz.erp.dataaccess.tsh_DocumentosPersonas.Update(dataSet);
        }
        public static tsh_DocumentosPersonasDataset.tsh_DocumentosPersonasRow GetByPk(string IdPersona, string IdDocumento)
        {
            tsh_DocumentosPersonasDataset data = new tsh_DocumentosPersonasDataset();

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

            cmd.CommandType = CommandType.StoredProcedure;

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

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

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

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

            adapter.Fill(data);

            if (data.tsh_DocumentosPersonas.Rows.Count == 1)
            {
                return((tsh_DocumentosPersonasDataset.tsh_DocumentosPersonasRow)data.tsh_DocumentosPersonas.Rows[0]);
            }

            return(null);
        }
        public static tsh_DocumentosPersonasDataset GetList(string IdPersona, string IdDocumento, DateTime FechaCreacion, long IdConexionCreacion, byte[] UltimaModificacion, long IdConexionUltimaModificacion, long IdReservado, Guid RowId, long IdEmpresa)
        {
            tsh_DocumentosPersonasDataset data = new tsh_DocumentosPersonasDataset();

            SqlDataAdapter adapter = new SqlDataAdapter();

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

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

            cmd.CommandType = CommandType.StoredProcedure;

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

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

            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 tsh_DocumentosPersonasDataset GetList()
        {
            tsh_DocumentosPersonasDataset data = new tsh_DocumentosPersonasDataset();

            return(( tsh_DocumentosPersonasDataset )GetList(data));
        }
 public static void Update(tsh_DocumentosPersonasDataset dataSet)
 {
     Update(dataSet.tsh_DocumentosPersonas);
 }