private string Save(ToDoService.ToDoItemContract toDoItemContract)
 {
     // get the todo list items
     ToDoService.ToDoServiceClient client = new ToDoService.ToDoServiceClient();
     
     try
     {
         // save the new task
         return client.SaveToDoItem(toDoItemContract);
     }
     catch (Exception ex)
     {
         client.Abort();
         // TODO: Client side save error message
         return "";
     }
 }
        private string Save(ToDoService.ToDoItemContract toDoItemContract)
        {
            // get the todo list items
            _client = new ToDoService.ToDoServiceClient();

            try
            {
                // save the new task
                return _client.SaveToDoItem(toDoItemContract);
            }
            catch (Exception ex)
            {
                _client.Abort();
                // ANDREI: logged an exeption into ErrorLog folder
                ErrorLog.Instance.WriteLog(ex);
                return "";
            }
        }
        private void LoadTasks()
        {
            // get the todo list items
            ToDoService.ToDoServiceClient client = new ToDoService.ToDoServiceClient();

            try
            {
                List<ToDoService.ToDoItemContract> toDoItems = client.GetToDoItems("").ToList();
                dlTasks.DataSource = toDoItems;
                dlTasks.DataBind();

                client.Close();
            }
            catch (Exception ex)
            {
                // TODO: Log error
                client.Abort();
            }
        }
        private void LoadTasks()
        {
            // get the todo list items
            _client = new ToDoService.ToDoServiceClient();

            try
            {
                _toDoItems = _client.GetToDoItems("").ToList();
                dlTasks.DataSource = _toDoItems;
                dlTasks.DataBind();

                _client.Close();
            }
            catch (Exception ex)
            {
                // ANDREI: logged an exeption into ErrorLog folder
                ErrorLog.Instance.WriteLog(ex);
                _client.Abort();
            }
        }
 public ToDoDataService(ToDoService.ToDoServiceClient toDoServiceClient)
 {
     _toDoServiceClient = toDoServiceClient;
 }