private ProjectNavigatorTDS SubmitSearch()
        {
            // Retrive parameters
            string projectNumber = tbxProjectNumber.Text.Trim();
            string name = tbxName.Text.Trim();
            string client = tbxClient.Text.Trim();
            string projectType = "";
            string projectState = "";
            string country = "";

            if (!Convert.ToBoolean(Session["sgLFS_PROJECTS_ADMIN"]))
            {
                projectType = ddlProjectType.SelectedItem.Value.ToString();
                projectState = ddlProjectState.SelectedItem.Value.ToString();
            }
            else
            {
                projectType = ddlProjectTypeAdmin.SelectedItem.Value.ToString();
                projectState = ddlProjectStateAdmin.SelectedItem.Value.ToString();
            }

            if (ddlCountry.SelectedIndex > 0)
            {
                country = ddlCountry.SelectedValue;
            }

            // Load data
            ProjectNavigatorGateway projectNavigatorGateway = new ProjectNavigatorGateway();
            projectNavigatorGateway.LoadByProjectNumberNameClientProjectTypeProjectStateCountry(projectNumber, name, client, projectType, projectState, country);

            return (ProjectNavigatorTDS)projectNavigatorGateway.Data;
        }
        private void StepProposalsIn()
        {
            // Set instruction
            mWizard2 master2 = (mWizard2)this.Master;
            master2.WizardInstruction = "Please select the proposal you would like to duplicate.";

            // Set grid to initial state
            lblError.Visible = false;

            // Prepare initial data
            // ... Load data
            ProjectNavigatorGateway projectNavigatorGateway = new ProjectNavigatorGateway(duplicateProjectNavigatorTDS);
            projectNavigatorGateway.LoadByProjectType("Proposal");

            //... for the total rows
            if (projectNavigatorGateway.Table.Rows.Count > 0)
            {
                lblTotalRows.Text = "Total Rows: " + projectNavigatorGateway.Table.Rows.Count;
                lblTotalRows.Visible = true;
            }
            else
            {
                lblTotalRows.Visible = false;
            }

            // ... Store datasets
            Session["duplicateProjectNavigatorTDS"] = duplicateProjectNavigatorTDS;
            Session["addDuplicateProjectNavigator"] = duplicateProjectNavigatorTDS.LFS_PROJECT_NAVIGATOR;
        }
        private void UpdateDatabase()
        {
            try
            {
                ProjectGateway projectGateway = new ProjectGateway(projectTDS);
                projectGateway.Update3();

                projectTDS.AcceptChanges();

                // Save notes
                int companyId = Int32.Parse(Session["companyID"].ToString());
                ProjectNavigatorGateway projectNavigatorGateway = new ProjectNavigatorGateway(projectNavigatorTDS);

                ProjectNavigatorProjectNotes projectNavigatorProjectNotes = new ProjectNavigatorProjectNotes(projectNavigatorTDS);
                projectNavigatorProjectNotes.Save(companyId);

                Session["lfsProjectTDS"] = projectTDS;
                Session["projectNavigatorTDS"] = projectNavigatorTDS;
                Session["lfsLibraryTDS"] = libraryTDS;
            }
            catch (Exception ex)
            {
                string url = string.Format("./../../error_page.aspx?error={0}", ex.Message.Replace('\n', ' '));
                Response.Redirect(url);
            }
        }