/// <summary>
        /// DeleteDirect
        /// </summary>
        /// <param name="companyId">companyId</param>
        public void DeleteDirect(int companyId)
        {
            FlatSectionJlTDS flatSectionJlChanges = (FlatSectionJlTDS)Data.GetChanges();
            if (flatSectionJlChanges.FlatSectionJl.Rows.Count > 0)
            {
                FlatSectionJlGateway flatSectionJlGateway = new FlatSectionJlGateway(flatSectionJlChanges);

                foreach (FlatSectionJlTDS.FlatSectionJlRow flatSectionJlRow in (FlatSectionJlTDS.FlatSectionJlDataTable)flatSectionJlChanges.FlatSectionJl)
                {
                    if ((flatSectionJlRow.Selected) && (flatSectionJlRow.Deleted))
                    {
                        // Get values
                        int workId = flatSectionJlRow.WorkID;
                        int assetId = flatSectionJlRow.AssetID;
                        int sectionWorkId = flatSectionJlRow.SectionWorkID;

                        // Delete
                        Delete(workId, assetId, sectionWorkId, companyId);
                    }
                }
            }
        }
        private void FLLateralsSave(string lateralId, bool requiresRoboticPrep, DateTime? equiresRoboticPrepIssueCompleted, bool holdClientIssue, bool holdLFSIssue, bool dyeTestReq, DateTime? dyeTestComplete)
        {
            int workIdJl = Int32.Parse(hdfWorkIdJl.Value);
            int companyId = Int32.Parse(hdfCompanyId.Value);
            flatSectionJlTDSForFLL = new FlatSectionJlTDS();

            FlatSectionJlGateway flatSectionJlGateway = new FlatSectionJlGateway(flatSectionJlTDSForFLL);
            flatSectionJlGateway.LoadAllByWorkId(workIdJl, companyId);

            string latId = lateralId.Substring(3, lateralId.Length - 3);

            if (flatSectionJlGateway.Table.Rows.Count > 0)
            {
                FlatSectionJl flatSectionJl = new FlatSectionJl(flatSectionJlTDSForFLL);

                flatSectionJl.UpdateAllLateralsFromFLL(latId, requiresRoboticPrep, equiresRoboticPrepIssueCompleted, holdClientIssue, holdLFSIssue, dyeTestReq, dyeTestComplete);
            }

            Session["flatSectionJlTDSForFLL"] = flatSectionJlTDSForFLL;
            flatSectionJlTDSForFLL.AcceptChanges();
        }
        // ////////////////////////////////////////////////////////////////////////
        // PUBLIC METHODS
        //
        /// <summary>
        /// LoadByAssetIdArrayList
        /// </summary>
        /// <param name="assetIdArrayList">ArrayList of assetsIds</param>
        /// <param name="selected">1 = Selected by default, 0 = Not selected by default</param>
        /// <param name="currentProjectId">currentProjectId</param>
        /// <param name="workType">workType</param>        
        /// <param name="companyId">companyId</param>
        public void LoadByAssetIdArrayList(ArrayList assetIdArrayList, int selected, int currentProjectId, string workType, int companyId)
        {
            // Loading data
            FlatSectionJlGateway flatSectionJlGateway = new FlatSectionJlGateway(Data);

            flatSectionJlGateway.Table.Clear();
            flatSectionJlGateway.ClearBeforeFill = false;

            foreach (JlId jlId in assetIdArrayList)
            {
                flatSectionJlGateway.LoadByAssetIdArrayList(currentProjectId, jlId.assetId, jlId.sectionId, companyId, selected);
            }

            flatSectionJlGateway.ClearBeforeFill = true;

            // Update some fields before to show
            UpdateFieldsForSections(currentProjectId, companyId);
        }