private void UnassignedServiceRequestsProcessGrid()
        {
            dashboardUnassignedServiceRequestsTDS = (DashboardTDS)HttpContext.Current.Session["dashboardUnassignedServiceRequestsTDS"];
            DashboardUnassignedServiceRequests model = new DashboardUnassignedServiceRequests(dashboardUnassignedServiceRequestsTDS);

            // update rows
            if (Session["dashboardUnassignedServiceRequestsDummy"] == null)
            {
                foreach (GridViewRow row in grdUnassignedServiceRequests.Rows)
                {
                    int serviceId = int.Parse(grdUnassignedServiceRequests.DataKeys[row.RowIndex].Values["ServiceID"].ToString());
                    bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked;

                    model.Update( serviceId, int.Parse(hdfCompanyId.Value), selected);
                }

                model.Table.AcceptChanges();

                dashboardUnassignedServiceRequests = (DashboardTDS.DashboardUnassignedServiceRequestsDataTable)model.Table;
                Session["dashboardUnassignedServiceRequests"] = dashboardUnassignedServiceRequests;

                HttpContext.Current.Session.Add("dashboardUnassignedServiceRequestsTDS", dashboardUnassignedServiceRequestsTDS);
            }
        }
        private void PostPageChanges()
        {
            DashboardUnassignedServiceRequests dashboardUnassignedServiceRequests = new DashboardUnassignedServiceRequests(dashboardUnassignedServiceRequestsTDS);

            // Update Grid SR Unassigned rows
            foreach (GridViewRow row in grdUnassignedServiceRequests.Rows)
            {
                string serviceIdLabel = ((Label)row.FindControl("lblServiceID")).Text.Trim();
                int serviceId = Int32.Parse(serviceIdLabel.ToString().Trim());
                bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked;
                int companyId = Int32.Parse(hdfCompanyId.Value);

                dashboardUnassignedServiceRequests.Update(serviceId, companyId, selected);
            }

            dashboardUnassignedServiceRequests.Data.AcceptChanges();

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