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

            if (workFunctionChanges != null)
            {
                if (workFunctionChanges.LFS_PROJECT_JOB_CLASS_TYPE_RATE.Rows.Count > 0)
                {
                    ProjectNavigatorProjectJobClassTypeRateGateway projectNavigatorProjectJobClassTypeRateGateway = new ProjectNavigatorProjectJobClassTypeRateGateway(workFunctionChanges);

                    foreach (ProjectNavigatorTDS.LFS_PROJECT_JOB_CLASS_TYPE_RATERow row in (ProjectNavigatorTDS.LFS_PROJECT_JOB_CLASS_TYPE_RATEDataTable)workFunctionChanges.LFS_PROJECT_JOB_CLASS_TYPE_RATE)
                    {
                        // Insert new Job Class Tye Rate
                        if ((!row.Deleted) && (!row.InDatabase))
                        {
                            ProjectJobClassTyeRate projectJobClassTyeRate = new ProjectJobClassTyeRate(null);
                            projectJobClassTyeRate.InsertDirect(row.ProjectID, row.JobClassType, row.RefID, row.Rate, row.Deleted, row.COMPANY_ID, row.FringeRate);
                        }

                        // Update Job Class Tye Rate
                        if ((!row.Deleted) && (row.InDatabase))
                        {
                            int projectId = row.ProjectID;
                            string jobClassType = row.JobClassType;
                            int refId = row.RefID;
                            bool originalDeleted = false;
                            int originalCompanyId = companyId;

                            // original values
                            decimal originalRate = projectNavigatorProjectJobClassTypeRateGateway.GetRateOriginal(projectId, jobClassType, refId);
                            decimal originalFringeRate = projectNavigatorProjectJobClassTypeRateGateway.GetFringeRateOriginal(projectId, jobClassType, refId);

                            // new values
                            decimal newRate = projectNavigatorProjectJobClassTypeRateGateway.GetRate(projectId, jobClassType, refId);
                            decimal newFringeRate = projectNavigatorProjectJobClassTypeRateGateway.GetFringeRate(projectId, jobClassType, refId);

                            ProjectJobClassTyeRate projectJobClassTyeRate = new ProjectJobClassTyeRate(null);
                            projectJobClassTyeRate.UpdateDirect(projectId, jobClassType, refId, originalRate, originalDeleted, originalCompanyId, originalFringeRate, projectId, jobClassType, refId, newRate, originalDeleted, originalCompanyId, newFringeRate);
                        }

                        // Delete Job Class Tye Rate
                        if ((row.Deleted) && (row.InDatabase))
                        {
                            ProjectJobClassTyeRate projectJobClassTyeRate = new ProjectJobClassTyeRate(null);
                            projectJobClassTyeRate.DeleteDirect(row.ProjectID, row.JobClassType, row.RefID, row.COMPANY_ID);
                        }
                    }
                }
            }
        }
 // ////////////////////////////////////////////////////////////////////////
 // PUBLIC METHODS
 //
 /// <summary>
 /// LoadAllByProjectId
 /// </summary>
 /// <param name="projectId">projectId</param>              
 public void LoadAllByProjectId(int projectId)
 {
     ProjectNavigatorProjectJobClassTypeRateGateway projectNavigatorProjectJobClassTypeRateGateway = new ProjectNavigatorProjectJobClassTypeRateGateway(Data);
     projectNavigatorProjectJobClassTypeRateGateway.LoadAllByProjectId(projectId);
 }