/// <summary> /// Envia los cambios del tlg_ComprobantesDataset a la base de datos. /// </summary> public static void Update(tlg_ComprobantesDataset dataSet) { ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber); ApplicationAssert.Check(dataSet.tlg_Comprobantes.Rows.Count > 0, "La tabla dataSet.tlg_ComprobantesDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber); mz.erp.dataaccess.tlg_Comprobantes.Update(dataSet); }
private static void MyFlush(tlg_ComprobantesDataset data, string IdTransaction) { //Ver como se hace aca????????????????????????????????????? //Aca se recupera la transaccion y se la pasa al update????????????? o se hace en dataaccess???????? //dataaccess.PoolTransaction.GetTransactionById(IdTransaction); dataaccess.tlg_Comprobantes.Update(data); }
public static tlg_ComprobantesDataset GetList( ) { tlg_ComprobantesDataset data = new tlg_ComprobantesDataset(); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.TableMappings.Add("Table", "tlg_Comprobantes"); SqlCommand cmd = new SqlCommand("Pr_tlg_Comprobantes_Search", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; adapter.SelectCommand = cmd; adapter.Fill(data); return(data); }
public static tlg_ComprobantesDataset.tlg_ComprobantesRow GetByPk(string IdComprobante) { tlg_ComprobantesDataset data = new tlg_ComprobantesDataset(); SqlCommand cmd = new SqlCommand("Pr_tlg_Comprobantes_GetByPk", dbhelper.Connection.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@IdComprobante", SqlDbType.VarChar)); cmd.Parameters["@IdComprobante"].Value = IdComprobante; SqlDataAdapter adapter = new SqlDataAdapter(cmd); adapter.TableMappings.Add("Table", "tlg_Comprobantes"); adapter.Fill(data); if (data.tlg_Comprobantes.Rows.Count == 1) { return((tlg_ComprobantesDataset.tlg_ComprobantesRow)data.tlg_Comprobantes.Rows[0]); } return(null); }
public static void Update(tlg_ComprobantesDataset dataSet) { Update(dataSet.tlg_Comprobantes); }