public void voidRunProc(string procName, string[] prams, string[] pramsValues)
{
try
{
this.OpenDB();
SqlCommand comm = new SqlCommand(procName, conn);
comm.CommandType = CommandType.StoredProcedure;
for (int i = 0; i <= prams.GetLength(0) - 1; i++)
{
if (pramsValues[i] != null)
{
comm.Parameters.AddWithValue(prams[i], pramsValues[i]);
}
else
{
comm.Parameters.AddWithValue(prams[i], System.DBNull.Value);
}
}
comm.ExecuteNonQuery();
}
catch (Exception err)
{
throw err;
}
finally
{
this.CloseDB();
}
}