private SubcontractorHoursNavigatorTDS SubmitSearchBySubcontractor()
        {
            // Retrieve clauses
            int subcontractorId = Convert.ToInt32(ddlSubcontractor.SelectedValue);

            string whereClause = GetWhereClauseBySubcontractor(subcontractorId);
            string orderByClause = GetOrderByClause();

            SubcontractorHoursNavigator subcontractorHoursNavigator = new SubcontractorHoursNavigator();

            subcontractorHoursNavigator.Load(whereClause, orderByClause);

            return (SubcontractorHoursNavigatorTDS)subcontractorHoursNavigator.Data;
        }
        private void PostPageChanges()
        {
            SubcontractorHoursNavigator subcontractorHoursNavigator = new SubcontractorHoursNavigator(subcontractorHoursNavigatorTDS);

            // Update
            foreach (GridViewRow row in grdNavigator.Rows)
            {
                if (((CheckBox)row.FindControl("cbxSelected")).Checked)
                {
                    int subcontractorId = Int32.Parse(((Label)row.FindControl("lblSubcontractorID")).Text.Trim());
                    int projectId = Int32.Parse(((Label)row.FindControl("lblProjectID")).Text.Trim());
                    int refId = Int32.Parse(((Label)row.FindControl("lblRefIDID")).Text.Trim());
                    bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked;

                    subcontractorHoursNavigator.Update(subcontractorId, projectId, refId, selected);
                }
            }

            subcontractorHoursNavigator.Data.AcceptChanges();

            // Store datasets
            Session["subcontractorHoursNavigatorTDS"] = subcontractorHoursNavigatorTDS;
        }