public static Object SQLHelper_ExecuteScalar(string Procedure_Name, List <SqlParameter> parameters) { try { _value = null; _sqlcom.CommandText = Procedure_Name; AdaptadorSQL.CreateParameters(parameters); _value = _sqlcom.ExecuteScalar(); AdaptadorSQL.FillTable(); } catch (Exception ex) { throw ex; } return(_value); }
public static Boolean SQLHelper_ExecuteNonQuery(string Procedure_Name, List <SqlParameter> parameters) { try { _result = false; _sqlcom.CommandText = Procedure_Name; AdaptadorSQL.CreateParameters(parameters); _sqlcom.ExecuteNonQuery(); AdaptadorSQL.FillTable(); _result = true; } catch (Exception ex) { throw ex; } return(_result); }
public static DataTable SQLHelper_ExecuteReader(string Procedure_Name, List <SqlParameter> parameters) { DataTable _data = null; try { _data = null; _sqlcom.CommandText = Procedure_Name; AdaptadorSQL.CreateParameters(parameters); SqlDataAdapter _adapter = new SqlDataAdapter(_sqlcom); DataSet dataset = new DataSet("SQLHelper"); _adapter.Fill(dataset); _data = dataset.Tables[0]; AdaptadorSQL.FillTable(); _sqltrn.Commit(); } catch (Exception ex) { throw ex; } return(_data); }