private void LoadBasicData(int projectId, int refId)
        {
            RevenueInformationBasicInformationGateway revenueInformationBasicInformationGateway = new RevenueInformationBasicInformationGateway(revenueInformationTDS);
            if (revenueInformationBasicInformationGateway.Table.Rows.Count > 0)
            {
                // Load employee basic data
                tbxClient.Text = revenueInformationBasicInformationGateway.GetClient(projectId, refId);
                tbxProject.Text = revenueInformationBasicInformationGateway.GetProject(projectId, refId);
                tbxDate.Text = revenueInformationBasicInformationGateway.GetDate(projectId, refId).ToShortDateString();
                tbxRevenue.Text = decimal.Round(revenueInformationBasicInformationGateway.GetRevenue(projectId, refId), 2).ToString();
                tbxComments.Text = revenueInformationBasicInformationGateway.GetComment(projectId, refId);

                string money = "";

                // Load the money
                if (revenueInformationBasicInformationGateway.GetCountryId(projectId, refId) == 1) // Canada
                {
                    lblRevenue.Text = "Revenue (CAD)";
                    money = " (CAD)";
                }
                else
                {
                    lblRevenue.Text = "Revenue (USD)";
                    money = " (USD)";
                }

                lblTitleRevenue.Text = "Revenue: " + tbxRevenue.Text + money + " (" + tbxDate.Text + ")";
            }
        }
        // ////////////////////////////////////////////////////////////////////////
        // EVENTS
        //
        protected void Page_Load(object sender, EventArgs e)
        {
            // Register client scripts
            this.RegisterClientScripts();

            if (!IsPostBack)
            {
                // Security check
                    if (!(Convert.ToBoolean(Session["sgLFS_PROJECTS_REVENUE_VIEW"]) && Convert.ToBoolean(Session["sgLFS_PROJECTS_REVENUE_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["project_id"] == null) || ((string)Request.QueryString["ref_id"] == null))
                {
                    Response.Redirect("./../../error_page.aspx?error=" + "Invalid query string in revenue_delete.aspx");
                }

                // Tag page
                hdfCompanyId.Value = Session["companyID"].ToString();
                hdfCurrentProjectId.Value = Request.QueryString["project_id"];
                hdfCurrentRefId.Value = Request.QueryString["ref_id"];

                // ... for team member title
                int companyId = Int32.Parse(hdfCompanyId.Value.Trim());
                int projectId = Int32.Parse(hdfCurrentProjectId.Value);
                int refId = Int32.Parse(hdfCurrentRefId.Value);

                RevenueInformationBasicInformationGateway revenueInformationBasicInformationGatewayForTitle = new RevenueInformationBasicInformationGateway();
                revenueInformationBasicInformationGatewayForTitle.LoadByProjectIdRefId(projectId, refId, companyId);
                decimal revenue = decimal.Round(revenueInformationBasicInformationGatewayForTitle.GetRevenue(projectId, refId), 2);
                string money = "";
                if (revenueInformationBasicInformationGatewayForTitle.GetCountryId(projectId, refId) == 1) // Canada
                {
                    money = " (CAD)";
                }
                else
                {
                    money = " (USD)";
                }

                lblTitleRevenue.Text = "Revenue: " + revenue + money + " (" + revenueInformationBasicInformationGatewayForTitle.GetDate(projectId, refId).ToShortDateString() + ")";

                // If coming from
                // ... revenue_navigator2.aspx
                if (Request.QueryString["source_page"] == "revenue_navigator2.aspx")
                {
                    revenueInformationTDS = new RevenueInformationTDS();
                    RevenueInformationBasicInformation revenueInformationBasicInformationForEdit = new RevenueInformationBasicInformation(revenueInformationTDS);
                    revenueInformationBasicInformationForEdit.LoadByProjectIdRefId(projectId, refId, companyId);

                    StoreNavigatorState();
                    ViewState["update"] = "no";

                    // Store dataset
                    Session["revenueInformationTDS"] = revenueInformationTDS;
                }

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

                    // Restore dataset
                    revenueInformationTDS = (RevenueInformationTDS)Session["revenueInformationTDS"];
                }
            }
            else
            {
                // Restore dataset
                revenueInformationTDS = (RevenueInformationTDS)Session["revenueInformationTDS"];
            }
        }