/// <summary>
        /// Save all Job Info to database (direct)
        /// </summary>
        /// <param name="companyId">companyId</param>
        public void Save(int companyId)
        {
            ProjectNavigatorTDS jobInfoChanges = (ProjectNavigatorTDS)Data.GetChanges();

            if (jobInfoChanges != null)
            {
                if (jobInfoChanges.ProjectJobInfo.Rows.Count > 0)
                {
                    ProjectNavigatorProjectJobInfoGateway projectNavigatorProjectJobInfoGateway = new ProjectNavigatorProjectJobInfoGateway(jobInfoChanges);

                    foreach (ProjectNavigatorTDS.ProjectJobInfoRow row in (ProjectNavigatorTDS.ProjectJobInfoDataTable)jobInfoChanges.ProjectJobInfo)
                    {
                        // Insert new Job Info
                        if (!row.InDatabase)
                        {
                            ProjectJobInfo projectService = new ProjectJobInfo(null);
                            projectService.InsertDirect(row.ProjectID, row.TypeOfWorkMhRehab, row.TypeOfWorkJuntionLining, row.TypeOfWorkProjectManagement, row.TypeOfWorkFullLenghtLining, row.TypeOfWorkPointRepairs, row.TypeOfWorkRehabAssessment, row.TypeOfWorkGrout, row.TypeOfWorkOther, row.COMPANY_ID, row.Agreement, row.Agreement, row.Role);
                        }

                        // Update Job Info
                        if (row.InDatabase)
                        {
                            int projectId = row.ProjectID;
                            int originalCompanyId = companyId;

                            // original values
                            bool originalTypeOfWorkMhRehab = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkMhRehabOriginal(projectId);
                            bool originalTypeOfWorkJuntionLining = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkJuntionLiningOriginal(projectId);
                            bool originalTypeOfWorkProjectManagement = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkProjectManagementOriginal(projectId);
                            bool originalTypeOfWorkFullLenghtLining = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkFullLenghtLiningOriginal(projectId);
                            bool originalTypeOfWorkPointRepairs = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkPointRepairsOriginal(projectId);
                            bool originalTypeOfWorkRehabAssessment = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkRehabAssessmentOriginal(projectId);
                            bool originalTypeOfWorkGrout = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkGroutOriginal(projectId);
                            bool originalTypeOfWorkOther = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkOtherOriginal(projectId);
                            bool originalAgreement = projectNavigatorProjectJobInfoGateway.GetAgreementOriginal(projectId);
                            bool originalWrittenQuote = projectNavigatorProjectJobInfoGateway.GetWrittenQuoteOriginal(projectId);
                            string originalRole = projectNavigatorProjectJobInfoGateway.GetRoleOriginal(projectId);

                            // new values
                            bool newTypeOfWorkMhRehab = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkMhRehab(projectId);
                            bool newTypeOfWorkJuntionLining = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkJuntionLining(projectId);
                            bool newTypeOfWorkProjectManagement = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkProjectManagement(projectId);
                            bool newTypeOfWorkFullLenghtLining = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkFullLenghtLining(projectId);
                            bool newTypeOfWorkPointRepairs = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkPointRepairs(projectId);
                            bool newTypeOfWorkRehabAssessment = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkRehabAssessment(projectId);
                            bool newTypeOfWorkGrout = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkGrout(projectId);
                            bool newTypeOfWorkOther = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkOther(projectId);
                            bool newAgreement = projectNavigatorProjectJobInfoGateway.GetAgreement(projectId);
                            bool newWrittenQuote = projectNavigatorProjectJobInfoGateway.GetWrittenQuote(projectId);
                            string newRole = projectNavigatorProjectJobInfoGateway.GetRole(projectId);

                            ProjectJobInfo projectService = new ProjectJobInfo(null);
                            projectService.UpdateDirect(projectId, originalTypeOfWorkMhRehab, originalTypeOfWorkJuntionLining, originalTypeOfWorkProjectManagement, originalTypeOfWorkFullLenghtLining, originalTypeOfWorkPointRepairs, originalTypeOfWorkRehabAssessment, originalTypeOfWorkGrout, originalTypeOfWorkOther, originalCompanyId, originalAgreement, originalWrittenQuote, originalRole, projectId, newTypeOfWorkMhRehab, newTypeOfWorkJuntionLining, newTypeOfWorkProjectManagement, newTypeOfWorkFullLenghtLining, newTypeOfWorkPointRepairs, newTypeOfWorkRehabAssessment, newTypeOfWorkGrout, newTypeOfWorkOther, originalCompanyId,  newAgreement, newWrittenQuote, newRole);
                        }
                    }
                }
            }
        }
        private void LoadJobInfoData()
        {
            ProjectNavigatorProjectJobInfoGateway projectNavigatorProjectJobInfoGateway = new ProjectNavigatorProjectJobInfoGateway(projectNavigatorTDS);

            if (projectNavigatorProjectJobInfoGateway.Table.Rows.Count == 0)
            {
                ProjectNavigatorProjectJobInfo projectNavigatorProjectJobInfo = new ProjectNavigatorProjectJobInfo(projectNavigatorTDS);
                projectNavigatorProjectJobInfo.Insert(int.Parse(hdfProjectId.Value), false, false, false, false, false, false, false, false, Int32.Parse(hdfCompanyId.Value.Trim()), false, false, false, "");

            }
            else
            {
                int projectId = int.Parse(hdfProjectId.Value);
                ckbxMhRehab.Checked = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkMhRehab(projectId);
                ckbxJunctionLining.Checked = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkJuntionLining(projectId);
                ckbxProjectManagement.Checked = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkProjectManagement(projectId);
                ckbxFullLengthLining.Checked = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkFullLenghtLining(projectId);
                ckbxPointRepairs.Checked = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkPointRepairs(projectId);
                ckbxRehabAssessment.Checked = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkRehabAssessment(projectId);
                ckbxGrout.Checked = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkGrout(projectId);
                ckbxOther.Checked = projectNavigatorProjectJobInfoGateway.GetTypeOfWorkOther(projectId);
                cbxSubcontractorAgreement.Checked = projectNavigatorProjectJobInfoGateway.GetAgreement(projectId);
                cbxSubcontractorWrittenQuote.Checked = projectNavigatorProjectJobInfoGateway.GetWrittenQuote(projectId);
                tbxSubcontractorRole.Text = projectNavigatorProjectJobInfoGateway.GetRole(projectId);
            }
        }