public object ExecuteNonQueryScalar(string sSql) { object rt; var entity = new Entity.DataAccess(); using (SqlConnection connection = GetConnection()) { entity.Connection = connection; connection.Open(); rt = entity.ExecuteNonQueryScalar(sSql); connection.Close(); } return(rt); }
public object GetIdMax(string strSql) { object rt; var entity = new Entity.DataAccess(); using (SqlConnection connection = GetConnection()) { entity.Connection = connection; connection.Open(); rt = entity.GetIdMax(strSql); connection.Close(); } return(rt); }
public DataSet GetDataSetStoredProcedure(object[] param, object[] value, string storedProcedureName) { var rt = new DataSet(); var entity = new Entity.DataAccess(); using (SqlConnection connection = GetConnection()) { entity.Connection = connection; connection.Open(); rt = entity.GetDataSetStoredProcedure(param, value, storedProcedureName); connection.Close(); } return(rt); }
public DataTable GetDataTable(string sSql) { DataTable rt; var entity = new Entity.DataAccess(); using (SqlConnection connection = GetConnection()) { entity.Connection = connection; connection.Open(); rt = entity.GetDataTable(sSql); connection.Close(); } return(rt); }
public bool ExecuteNonQueryStoredProcedure(object[] param, object[] value, string storedProcedureName, ref decimal returnId, string returnFieldName) { bool rt; var entity = new Entity.DataAccess(); using (SqlConnection connection = GetConnection()) { entity.Connection = connection; connection.Open(); rt = entity.ExecuteNonQueryStoredProcedure(param, value, storedProcedureName, ref returnId, returnFieldName); connection.Close(); } return(rt); }