/// <summary> /// Envia los cambios del twf_TareasTiposDeComprobantesDataset a la base de datos. /// </summary> public static void Update(twf_TareasTiposDeComprobantesDataset dataSet) { ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber); ApplicationAssert.Check(dataSet.twf_TareasTiposDeComprobantes.Rows.Count > 0, "La tabla dataSet.twf_TareasTiposDeComprobantesDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber); mz.erp.dataaccess.twf_TareasTiposDeComprobantes.Update(dataSet); }
public static twf_TareasTiposDeComprobantesDataset.twf_TareasTiposDeComprobantesRow GetByPk(long IdTarea, string IdTipoDeComprobante) { twf_TareasTiposDeComprobantesDataset data = new twf_TareasTiposDeComprobantesDataset(); SqlCommand cmd = new SqlCommand("Pr_twf_TareasTiposDeComprobantes_GetByPk", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdTarea", SqlDbType.BigInt)); cmd.Parameters["@IdTarea"].Value = IdTarea; cmd.Parameters.Add(new SqlParameter("@IdTipoDeComprobante", SqlDbType.VarChar)); cmd.Parameters["@IdTipoDeComprobante"].Value = IdTipoDeComprobante; SqlDataAdapter adapter = new SqlDataAdapter(cmd); adapter.TableMappings.Add("Table", "twf_TareasTiposDeComprobantes"); adapter.Fill(data); if (data.twf_TareasTiposDeComprobantes.Rows.Count == 1) { return((twf_TareasTiposDeComprobantesDataset.twf_TareasTiposDeComprobantesRow)data.twf_TareasTiposDeComprobantes.Rows[0]); } return(null); }
public static DataSet GetList([SearchParameterInfo("IdTarea")] long IdTarea, [SearchParameterInfo("IdTipoDeComprobante")] string IdTipoDeComprobante, [SearchParameterInfo("IdConexion")] long IdConexion, [SearchParameterInfo("FechaCreacion")] DateTime FechaCreacion, [SearchParameterInfo("IdConexionCreacion")] long IdConexionCreacion, [SearchParameterInfo("UltimaModificacion")] byte[] UltimaModificacion, [SearchParameterInfo("IdConexionUltimaModificacion")] long IdConexionUltimaModificacion, [SearchParameterInfo("RowId")] Guid RowId, [SearchParameterInfo("Observaciones")] string Observaciones ) { twf_TareasTiposDeComprobantesDataset data = mz.erp.businessrules.twf_TareasTiposDeComprobantes.GetList(IdTarea, IdTipoDeComprobante, IdConexion, FechaCreacion, IdConexionCreacion, UltimaModificacion, IdConexionUltimaModificacion, RowId, Observaciones); return(( DataSet )data); }
public static twf_TareasTiposDeComprobantesDataset GetList(long IdTarea, string IdTipoDeComprobante, long IdConexion, DateTime FechaCreacion, long IdConexionCreacion, byte[] UltimaModificacion, long IdConexionUltimaModificacion, Guid RowId, string Observaciones) { twf_TareasTiposDeComprobantesDataset data = new twf_TareasTiposDeComprobantesDataset(); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.TableMappings.Add("Table", "twf_TareasTiposDeComprobantes"); SqlCommand cmd = new SqlCommand("Pr_twf_TareasTiposDeComprobantes_Search", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdTarea", SqlDbType.BigInt)); if (IdTarea == long.MinValue) { cmd.Parameters["@IdTarea"].Value = System.DBNull.Value; } else { cmd.Parameters["@IdTarea"].Value = IdTarea; } cmd.Parameters.Add(new SqlParameter("@IdTipoDeComprobante", SqlDbType.VarChar)); cmd.Parameters["@IdTipoDeComprobante"].Value = IdTipoDeComprobante; cmd.Parameters.Add(new SqlParameter("@IdConexion", SqlDbType.BigInt)); if (IdConexion == long.MinValue) { cmd.Parameters["@IdConexion"].Value = System.DBNull.Value; } else { cmd.Parameters["@IdConexion"].Value = IdConexion; } cmd.Parameters.Add(new SqlParameter("@FechaCreacion", SqlDbType.DateTime)); cmd.Parameters["@FechaCreacion"].Value = FechaCreacion; cmd.Parameters.Add(new SqlParameter("@IdConexionCreacion", SqlDbType.BigInt)); if (IdConexionCreacion == long.MinValue) { cmd.Parameters["@IdConexionCreacion"].Value = System.DBNull.Value; } else { 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)); if (IdConexionUltimaModificacion == long.MinValue) { cmd.Parameters["@IdConexionUltimaModificacion"].Value = System.DBNull.Value; } else { cmd.Parameters["@IdConexionUltimaModificacion"].Value = IdConexionUltimaModificacion; } cmd.Parameters.Add(new SqlParameter("@RowId", SqlDbType.UniqueIdentifier)); cmd.Parameters["@RowId"].Value = RowId; cmd.Parameters.Add(new SqlParameter("@Observaciones", SqlDbType.VarChar)); cmd.Parameters["@Observaciones"].Value = Observaciones; adapter.SelectCommand = cmd; adapter.Fill(data); return(data); }
public static twf_TareasTiposDeComprobantesDataset GetList() { twf_TareasTiposDeComprobantesDataset data = new twf_TareasTiposDeComprobantesDataset(); return(( twf_TareasTiposDeComprobantesDataset )GetList(data)); }
public static void Update(twf_TareasTiposDeComprobantesDataset dataSet) { Update(dataSet.twf_TareasTiposDeComprobantes); }