public Response <Column> AddColumn(string email, int columnOrdinal, string Name) { try { Column c = new Column(BC.AddColumn(email, columnOrdinal, Name)); return(new Response <Column>(c)); } catch (Exception e) { return(new Response <Column>(e.Message)); } }
/// <summary> /// Adds a new column, given it's name and a location to place it. /// The first column is identified by 0, the ID increases by 1 for each column /// </summary> /// <param name="email">Email of the user. Must be logged in</param> /// <param name="columnOrdinal">Location to place to column</param> /// <param name="Name">new Column name</param> /// <returns>A response object with a value set to the Column, the response should contain a error message in case of an error</returns> public Response <Column> AddColumn(string email, int columnOrdinal, string Name) { try { Column rtn = bController.AddColumn(email, columnOrdinal, Name); log.Info("Column added successfully"); return(new Response <Column>(rtn)); } catch (KanbanException e) { log.Warn("Column could not be added: error" + e.Message); return(new Response <Column>(e.Message)); } catch (Exception e) { log.Error("Column could not be added: error" + e.Message); return(new Response <Column>(e.Message)); } }