private void LoginDriver() { if (ddl_Driver.SelectedValue == null) { return; } try { int driverId = ddl_Driver.SelectedValue.ToInt(); using (TaxiDataContext db = new TaxiDataContext()) { if (db.Fleet_DriverQueueLists.Count(c => c.Status == true && c.DriverId == driverId) == 0) { if (db.Fleet_Driver_PDASettings.Where(c => c.DriverId == driverId && c.HasCompanyCars != null && c.HasCompanyCars == true).Count() > 0) { } else { db.stp_LoginLogoutDriver(driverId, true, null); } new BroadcasterData().BroadCastToAll(RefreshTypes.REFRESH_DASHBOARD_DRIVER); } } // (Application.OpenForms.OfType<Form>().FirstOrDefault(c => c.Name == "frmBookingDashBoard") as frmBookingDashBoard).RefreshDashBoardDrivers(); } catch { } }