public void AddOutputParaMeter(string name, string value, DB_con.DBTrans trans) { try { cmd.Parameters.AddWithValue(name, value); cmd.Parameters[name].Direction = ParameterDirection.Output; } catch (Exception ex) { throw ex; } }
public void addParameter(string name, string value, DB_con.DBTrans trans) { try { if (trans == DBTrans.Insert) { cmd.Parameters.AddWithValue(name, value); //cmd.Parameters[name].Direction = ParameterDirection.Output; } else if (trans == DBTrans.Update) { cmd.Parameters.AddWithValue(name, value); } } catch (Exception ex) { throw ex; } }