protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (Session["IdUser"] == null)
         {
             FormsAuthentication.RedirectToLoginPage();
         }
         else
         {
             var idUser = int.Parse(Session["IdUser"].ToString());
             try
             {
                 using (var serviceClient = new QCAstServiceClient())
                 {
                     var user = serviceClient.GetUserFromId(idUser);
                     if (user.IdProfile != 4)
                     {
                         Response.Redirect("ErrorPage.aspx?Error=NotAuthorised");
                     }
                     else
                     {
                         ddlReport.DataSource = serviceClient.GetAllReports();
                         ddlReport.DataBind();
                         ddlReport.Items.Insert(0, new ListItem("Please select..", "0"));
                         ddlClient.DataSource = serviceClient.GetAllClients("All", "");
                         ddlClient.DataBind();
                         ddlClient.Items.Insert(0, new ListItem("Please select..", "0"));
                         ClearListAndTextBoxes();
                     }
                 }
             }
             catch (Exception ex)
             {
                 NotifyWebmasterOfError("Billing", "Reports PageLoad", ex.ToString());   
             }
         }
     }
 }