private void UpdateDatabase()
        {
            int companyId = Int32.Parse(hdfCompanyId.Value);
            int originalProjectId = Int32.Parse( hdfCurrentProjectId.Value);

            DB.Open();
            DB.BeginTransaction();
            try
            {
                ProjectNavigatorProjectNotes projectNavigatorProjectNotes = new ProjectNavigatorProjectNotes(projectNavigatorTDS);
                projectNavigatorProjectNotes.Save(companyId);

                // Store datasets
                Session["projectNavigatorTDS"] = projectNavigatorTDS;

                DB.CommitTransaction();
            }
            catch (Exception ex)
            {
                DB.RollbackTransaction();

                string url = string.Format("./../../error_page.aspx?error={0}", ex.Message.Replace('\n', ' '));
                Response.Redirect(url);
            }
        }
        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);
            }
        }