public DashboardTDS.DashboardUnassignedServiceRequestsDataTable GetDetails()
        {
            dashboardUnassignedServiceRequests = (DashboardTDS.DashboardUnassignedServiceRequestsDataTable)HttpContext.Current.Session["dashboardUnassignedServiceRequestsDummy"];

            if (dashboardUnassignedServiceRequests == null)
            {
                dashboardUnassignedServiceRequests = ((DashboardTDS)HttpContext.Current.Session["dashboardUnassignedServiceRequestsTDS"]).DashboardUnassignedServiceRequests;

            }

            return dashboardUnassignedServiceRequests;
        }
        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);
            }
        }
        protected void UnassignedServiceRequestsEmptyFix(GridView grdView)
        {
            if (grdUnassignedServiceRequests.Rows.Count == 0)
            {
                DashboardTDS.DashboardUnassignedServiceRequestsDataTable dt = new DashboardTDS.DashboardUnassignedServiceRequestsDataTable();
                dt.AddDashboardUnassignedServiceRequestsRow(0, "", false, "");
                Session["dashboardUnassignedServiceRequestsDummy"] = dt;

                grdUnassignedServiceRequests.DataBind();
            }

            // Normally executes at all postbacks
            if (grdUnassignedServiceRequests.Rows.Count == 1)
            {
                DashboardTDS.DashboardUnassignedServiceRequestsDataTable dt = (DashboardTDS.DashboardUnassignedServiceRequestsDataTable)Session["dashboardUnassignedServiceRequestsDummy"];
                if (dt != null)
                {
                    // Hide row
                    grdUnassignedServiceRequests.Rows[0].Visible = false;
                    grdUnassignedServiceRequests.Rows[0].Controls.Clear();
                }
            }
        }