private void StepSelectSectionsProcessGrid()
        {
            ProjectAddSectionsTDS dataSet = new ProjectAddSectionsTDS();
            dataSet.ProjectAddSectionsSearch.Merge(projectAddSectionsSearch, true);
            ProjectAddSectionsSearch model = new ProjectAddSectionsSearch(dataSet);

            // update rows
            if (Session["projectAddSectionsSearchDummy"] == null)
            {
                foreach (GridViewRow row in grdProjectAddSectionsSearch.Rows)
                {
                    string sectionId = ((Label)row.FindControl("lblSectionID")).Text.Trim();
                    bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked;

                    bool rehabAssessment = ((CheckBox)row.FindControl("cbxRehabAssessmentPrevWork")).Checked;
                    bool fullLengthLining = ((CheckBox)row.FindControl("cbxFullLengthLiningPrevWork")).Checked;
                    bool pointRepairs = ((CheckBox)row.FindControl("cbxPointRepairsPrevWork")).Checked;
                    bool junctionLining = ((CheckBox)row.FindControl("cbxJunctionLiningPrevWork")).Checked;

                    bool rehabAssessmentPrevWork = ((CheckBox)row.FindControl("cbxRehabAssessmentPrevWorkReadOnly")).Checked;
                    bool fullLengthLiningPrevWork = ((CheckBox)row.FindControl("cbxFullLengthLiningPrevWorkReadOnly")).Checked;
                    bool pointRepairsPrevWork = ((CheckBox)row.FindControl("cbxPointRepairsPrevWorkReadOnly")).Checked;
                    bool junctionLiningPrevWork = ((CheckBox)row.FindControl("cbxJunctionLiningPrevWorkReadOnly")).Checked;

                    model.UpdateBySectionId(sectionId, rehabAssessment, fullLengthLining, pointRepairs, junctionLining, selected, rehabAssessmentPrevWork, fullLengthLiningPrevWork, pointRepairsPrevWork, junctionLiningPrevWork);
                }

                model.Table.AcceptChanges();

                projectAddSectionsSearch = (ProjectAddSectionsTDS.ProjectAddSectionsSearchDataTable)model.Table;
                Session["projectAddSectionsSearch"] = projectAddSectionsSearch;
            }
        }
        private void StepSelectForIntermediateSectionsProcessGrid()
        {
            ProjectAddSectionsTDS dataSet = new ProjectAddSectionsTDS();
            dataSet.ProjectAddSectionsSearch.Merge(projectAddSectionsSearch, true);
            ProjectAddSectionsSearch model = new ProjectAddSectionsSearch(dataSet);

            // update rows
            if (Session["projectAddSectionsSearchDummy"] == null)
            {
                foreach (GridViewRow row in grdSelectForIntermediateSectionsSearch.Rows)
                {
                    string sectionId = ((Label)row.FindControl("lblSectionID_")).Text.Trim();
                    bool selected = ((CheckBox)row.FindControl("cbxSelected_")).Checked;

                    model.UpdateBySectionId(sectionId, false, false, false, false, selected, false, false, false, false);
                }

                model.Table.AcceptChanges();

                projectAddSectionsSearch = (ProjectAddSectionsTDS.ProjectAddSectionsSearchDataTable)model.Table;
                Session["projectAddSectionsSearch"] = projectAddSectionsSearch;
            }
        }