void frmPlotDriver_Shown(object sender, EventArgs e) { if (IsPlotting) { if (AppVars.objPolicyConfiguration.EnablePDA.ToBool()) { ComboFunctions.FillFreezePlottedDriverNoCombo(ddl_Driver); } else { ComboFunctions.FillDriverNoCombo(ddl_Driver); } ComboFunctions.FillZonesPlottedCombo(ddlZone); ComboFunctions.FillVehicleCombo(ddlVehicle); } else { Pg_Ordering.Item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; Pg_Main.Text = "Un-Plot"; ddlZone.Enabled = false; ddlVehicle.Enabled = false; lblZone.Enabled = false; var list1 = General.GetQueryable <Fleet_DriverQueueList>(a => a.DriverId != null && a.Status == true); var query = from a in list1 orderby a.QueueDateTime select new { Id = a.Id, DriverNo = a.Fleet_Driver.DriverNo + " - " + a.Fleet_Driver.DriverName, }; ComboFunctions.FillCombo(query.ToList(), ddl_Driver, "DriverNo", "Id"); } ddl_Driver.RootElement.Focus(); ddl_Driver.RootElement.Children[0].Focus(); IsFormLoaded = true; if (DriverId != 0) { DriverQueueBO objMaster = new DriverQueueBO(); objMaster.GetByPrimaryKey(DriverId); ddl_Driver.SelectedValue = objMaster.Current.DriverId.ToInt(); ddlZone.SelectedValue = objMaster.Current.ZoneId.ToInt(); ddlVehicle.SelectedValue = objMaster.Current.FleetMasterId.ToInt(); } }