private List <SiteEngineer> ConvertRowEngineerToObject(DataTable dataTable)
        {
            int rowsCount = dataTable.Rows.Count;
            List <SiteEngineer> siteEngineers = new List <SiteEngineer>();

            if (rowsCount > 0)
            {
                for (int i = 0; i < rowsCount; i++)
                {
                    SiteEngineer siteEngineer = new SiteEngineer();
                    siteEngineer.SiteEngineerId = (int)dataTable.Rows[i]["SiteEngineerId"];
                    siteEngineer.Name           = (string)dataTable.Rows[i]["Name"];
                    siteEngineers.Add(siteEngineer);
                }
            }

            return(siteEngineers);
        }
 protected void RangeDropDownList_OnSelectedIndexChanged(object sender, EventArgs e)
 {
     if (Session["currentRange"] != null)
     {
         if ((int)Session["currentRange"] != RangeDropDownList.SelectedIndex)
         {
             SiteEngineer currentEngineer = ENETCareGlobal.CurrentUser as SiteEngineer;
             if (RangeDropDownList.SelectedIndex == 0)
             {
                 InterventionsGridView.DataSourceID = "AllInterventionODS";
                 InterventionsGridView.DataBind();
                 Session["currentRange"] = 0;
             }
             else
             {
                 InterventionsGridView.DataSourceID = "RegionInterventionODS";
                 InterventionsGridView.DataBind();
                 Session["currentRange"] = 1;
             }
         }
     }
 }
        protected void RegionInterventionODS_OnSelecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            SiteEngineer currentEngineer = ENETCareGlobal.CurrentUser as SiteEngineer;

            e.InputParameters.Add("district", currentEngineer.District);
        }