/// <summary>
 /// InitData
 /// </summary>
 protected override void InitData()
 {
     _data = new ToDoListTDS();
 }
        // ////////////////////////////////////////////////////////////////////////
        // EVENTS
        //
        protected void Page_Load(object sender, EventArgs e)
        {
            // Register client scripts
            this.RegisterClientScripts();

            if (!IsPostBack)
            {
                // Security check
                if (!(Convert.ToBoolean(Session["sgLFS_FLEETMANAGEMENT_TODOLIST_VIEW"]) && Convert.ToBoolean(Session["sgLFS_FLEETMANAGEMENT_TODOLIST_DELETE"])))
                {
                    Response.Redirect("./../../error_page.aspx?error=" + "You are not authorized to view this page. Contact your system administrator.");
                }

                // Validate query string
                if (((string)Request.QueryString["source_page"] == null) || ((string)Request.QueryString["toDo_id"] == null) || ((string)Request.QueryString["dashboard"] == null))
                {
                    Response.Redirect("./../../error_page.aspx?error=" + "Invalid query string in toDoList_delete.aspx");
                }

                // Tag Page
                hdfCompanyId.Value = Session["companyID"].ToString();
                hdfToDoListId.Value = Request.QueryString["toDo_id"].ToString();
                hdfDashboard.Value = Request.QueryString["dashboard"].ToString();
                hdfFmType.Value = "ToDoList";

                // If comming from
                // ... toDoList_navigator2.aspx
                if (Request.QueryString["source_page"] == "toDoList_navigator2.aspx")
                {
                    StoreNavigatorState();
                    ViewState["update"] = "no";

                    toDolistInformationTDS = new ToDoListInformationTDS();
                    toDoListTDS = new ToDoListTDS();

                    int toDolistId = Int32.Parse(hdfToDoListId.Value);
                    int companyId = Int32.Parse(hdfCompanyId.Value);

                    ToDoListInformationBasicInformation toDolistInformationBasicInformation = new ToDoListInformationBasicInformation(toDolistInformationTDS);
                    toDolistInformationBasicInformation.LoadAllByToDoId(toDolistId, companyId);

                    ToDoListInformationActivityInformation toDoListInformationActivityInformation = new ToDoListInformationActivityInformation(toDolistInformationTDS);
                    toDoListInformationActivityInformation.LoadAllByToDoId(toDolistId, companyId);

                    // Store dataset
                    Session["toDolistInformationTDS"] = toDolistInformationTDS;
                    Session["toDoListTDS"] = toDoListTDS;
                }

                // ... toDoList_summary.aspx
                if (Request.QueryString["source_page"] == "toDoList_summary.aspx")
                {
                    StoreNavigatorState();
                    ViewState["update"] = Request.QueryString["update"];

                    // Restore dataset
                    toDoListTDS = (ToDoListTDS)Session["toDoListTDS"];
                    toDolistInformationTDS = (ToDoListInformationTDS)Session["toDolistInformationTDS"];
                }
            }
            else
            {
                // Restore datasets
                toDoListTDS = (ToDoListTDS)Session["toDoListTDS"];
                toDolistInformationTDS = (ToDoListInformationTDS)Session["toDolistInformationTDS"];
            }
        }