/// <summary> /// Saves the Size. /// </summary> /// <returns>Size object</returns> public Size SaveSize() { SqlDataReader result; DatabaseConnection dbconn = new DatabaseConnection(); SqlCommand command = new SqlCommand(); SqlConnection connection = new SqlConnection(dbconn.SQLSEVERConnString); try { connection.Open(); command.Connection = connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "InsertUpdate_Size"; command.Parameters.Add(dbconn.GenerateParameterObj("@SizeID", SqlDbType.Int, SizeID.ToString(), 0)); command.Parameters.Add(dbconn.GenerateParameterObj("@SizeName", SqlDbType.VarChar, SizeName.ToString(), 50)); command.Parameters.Add(dbconn.GenerateParameterObj("@SizeModifier", SqlDbType.Int, SizeModifier.ToString(), 0)); result = command.ExecuteReader(); result.Read(); SetReaderToObject(ref result); } catch { Exception e = new Exception(); this._insertUpdateOK = false; this._insertUpdateMessage.Append(e.Message + " Inner Exception= " + e.InnerException); throw e; } finally { command.Dispose(); connection.Close(); } return(this); }
public SizeModifierEditor(SplineUser user, SplineUserEditor editor, SizeModifier input) : base(user, editor, input) { module = input; title = "Size Modifiers"; }