Пример #1
0
 private void ExchangeColumns(int num1, int num2) // change the position of 2 columns in the list
 {
     TC.Column temp = columns[num1];
     columns[num1] = columns[num2];
     columns[num2] = temp;
     columns[num1].SetOrd(num1);
     columns[num2].SetOrd(num2);
     log.Debug("the columns #" + num1 + " #" + num2 + " chenge place.");
 }
Пример #2
0
        private Column ChengeType(TC.Column columnBL)// convert a BuisnessLayer column to a ServiceLayer column
        {
            List <Task> TaskListSL = new List <Task>();

            foreach (TC.Task taskBL in columnBL.GetAll())
            {
                TaskListSL.Add(ChengeType(taskBL));
            }
            return(new Column(TaskListSL, columnBL.GetName(), columnBL.GetLimit()));
        }
Пример #3
0
 public Response <Column> GetColumn(string email, int columnOrdinal) // get column data of a specific column (by ID)
 {
     log.Debug(email + " attempting to get column #" + columnOrdinal + ".");
     try
     {
         TC.Column columnBL = BC.GetColumn(email, columnOrdinal);
         return(new Response <Column>(ChengeType(columnBL)));
     }
     catch (Exception e) { return(new Response <Column>(e.Message)); }
 }
Пример #4
0
        private List <TC.Column> ColumnsToBT(List <DAL.Column> list) // convert DAL columns to BL columns
        {
            List <TC.Column> output = new List <TC.Column>();

            foreach (DAL.Column a in list)
            {
                TC.Column temp = new TC.Column();
                temp.FromDalObject(a);
                output.Add(temp);
            }
            return(output);
        }