protected void dsHistory_Updating(object sender, ObjectDataSourceMethodEventArgs e)
 {
     CF.History history = e.InputParameters[0] as CF.History;
     DriverManager dm = new DriverManager();
     UserManager um = new UserManager();
     history.Driver = dm.GetById(Convert.ToInt32((fvEditHistory.FindControl("ddlDrivers") as DropDownList).SelectedValue));
     history.User = um.GetById(Convert.ToInt32((fvEditHistory.FindControl("ddlUsers") as DropDownList).SelectedValue));
 }
        public string addToQueue(int driverId , int regionId)
        {
            //Clients.All.hello(data);
            DriverManager dm = new DriverManager();
            CityManager cm = new CityManager();
            Region region = cm.GetRegionsById(regionId);
            Driver driver = dm.GetById(driverId);
            DriverWorkModel driver_wm = new DriverWorkModel(driver, Status.Online, region);
            driver_wm.SignalR_id = Context.ConnectionId;
            QueueController queueController = new QueueController();

            if (!queueController.HasSuchDriver(driver_wm))
            {
                queueController.AddToQueue(driver_wm);
                Groups.Add(driver_wm.SignalR_id, "Drivers");
                 return "queue count:" + queueController.GetConunt();
            }
            return "this driver is alredy added in queue";
        }