protected void Page_Init(object sender, EventArgs e) { if (SearchState.ValidateDetailsPageParameters(Request.Params)) { State = new SearchState("Details", Request.Params, new HotelBooking.HotelBookingDataContextExt()); } CheckInDateEdit.MinDate = DateTime.Now + TimeSpan.FromDays(1); if (State != null) { LocationComboBox.DataBindItems(); LocationComboBox.SelectedItem = LocationComboBox.Items.FindByValue(State.Metro_Area.ID); CheckOutDateEdit.Value = State.CheckOutDate; CheckInDateEdit.Value = State.CheckInDate; RoomsComboBox.Value = State.RoomsCount; AdultsSpinEdit.Value = State.AdultsCount; ChildrenSpinEdit.Value = State.ChildrenCount; } else { CheckOutDateEdit.Value = DateTime.Now + TimeSpan.FromDays(3); CheckInDateEdit.Value = DateTime.Now + TimeSpan.FromDays(1); } }
private void RefreshCombos() { EquipTypeComboBox.FillComboBox(Attributes.DeviceAttributes.EquipType); LocationComboBox.FillComboBox(Attributes.DeviceAttributes.Locations); StatusComboBox.FillComboBox(Attributes.DeviceAttributes.StatusType); OSTypeComboBox.FillComboBox(Attributes.DeviceAttributes.OSType); }
public void FillLocationCombobox() { DataTable dt = VSWebBL.DashboardBL.KeyMetricsBL.Ins.GetLocation(); LocationComboBox.DataSource = dt; LocationComboBox.TextField = "Location"; LocationComboBox.DataBind(); LocationComboBox.SelectedIndex = 0; }
private void FillLocationComboBox() { DataTable LocationDataTable = VSWebBL.SecurityBL.LocationsBL.Ins.GetAllData(); LocationComboBox.DataSource = LocationDataTable; LocationComboBox.TextField = "Location"; LocationComboBox.ValueField = "Location"; LocationComboBox.DataBind(); }
private void InitDBControls() { SerialSearchTextBox.SetDBInfo(DevicesCols.Serial); AssetTagSearchTextBox.SetDBInfo(DevicesCols.AssetTag); DescriptionTextBox.SetDBInfo(DevicesCols.Description); EquipTypeComboBox.SetDBInfo(DevicesCols.EQType, Attributes.DeviceAttributes.EquipType); ReplaceYearTextBox.SetDBInfo(DevicesCols.ReplacementYear); OSTypeComboBox.SetDBInfo(DevicesCols.OSVersion, Attributes.DeviceAttributes.OSType); LocationComboBox.SetDBInfo(DevicesCols.Location, Attributes.DeviceAttributes.Locations); CurrrentUserTextBox.SetDBInfo(DevicesCols.CurrentUser); StatusComboBox.SetDBInfo(DevicesCols.Status, Attributes.DeviceAttributes.StatusType); TrackablesCheckBox.SetDBInfo(DevicesCols.Trackable); }
public BicycleDataInputForm(UpdateForm uf, int i, MainMenu mm) { InitializeComponent(); myCaller = uf; mainMenu = mm; BicycleDataInputFormTitle.Text = "Modify Bicycle data"; Object[] location = new Object[7]; location[0] = "Benedict Hall"; location[1] = "Harmon Hall"; location[2] = "McFarlane Hall"; location[3] = "Mortimer Hall"; location[4] = "Student Union"; location[5] = "Thompson Hall"; location[6] = "Welcome Center"; LocationComboBox.Items.AddRange(location); Object[] physical = new Object[2]; physical[0] = "Good"; physical[1] = "Damaged"; PhysicalConditionComboBox.Items.AddRange(physical); Object[] status = new Object[2]; status[0] = "Available"; status[1] = "Unavailable"; StatusComboBox.Items.AddRange(status); Vehicle existingVehicle = new Vehicle(); existingVehicle.populate(i); BikeMakeBox.Text = existingVehicle.BikeMake; ModelNumberBox.Text = existingVehicle.ModelNumber; SerialNumberBox.Text = existingVehicle.SerialNumber; ColorBox.Text = existingVehicle.Color; DescriptionBox.Text = existingVehicle.Description; LocationComboBox.SelectedIndex = LocationComboBox.FindStringExact(existingVehicle.Location); PhysicalConditionComboBox.SelectedIndex = PhysicalConditionComboBox.FindStringExact(existingVehicle.PhysicalCondition); NotesBox.Text = existingVehicle.Notes; StatusComboBox.SelectedIndex = StatusComboBox.FindStringExact(existingVehicle.Status); FormAction = "update"; id = i; }
private void InitDBControls() { DescriptionTextBox.SetDBInfo(DevicesBaseCols.Description, true); AssetTagTextBox.SetDBInfo(DevicesBaseCols.AssetTag, true); SerialTextBox.SetDBInfo(DevicesBaseCols.Serial, true); PurchaseDatePicker.SetDBInfo(DevicesBaseCols.PurchaseDate, true); ReplaceYearTextBox.SetDBInfo(DevicesBaseCols.ReplacementYear, false); LocationComboBox.SetDBInfo(DevicesBaseCols.Location, Attributes.DeviceAttributes.Locations, true); CurrentUserTextBox.SetDBInfo(DevicesBaseCols.CurrentUser, true); OSTypeComboBox.SetDBInfo(DevicesBaseCols.OSVersion, Attributes.DeviceAttributes.OSType, true); PhoneNumTextBox.SetDBInfo(DevicesBaseCols.PhoneNumber, false); EquipTypeComboBox.SetDBInfo(DevicesBaseCols.EQType, Attributes.DeviceAttributes.EquipType, true); StatusComboBox.SetDBInfo(DevicesBaseCols.Status, Attributes.DeviceAttributes.StatusType, true); TrackableCheckBox.SetDBInfo(DevicesBaseCols.Trackable, false); POTextBox.SetDBInfo(DevicesBaseCols.PO, false); HostnameTextBox.SetDBInfo(DevicesBaseCols.HostName, false); iCloudTextBox.SetDBInfo(DevicesBaseCols.iCloudAccount, false); }
private void fillLocationComboBox() { //6/30/2014 NS added for VSPLUS-789 try { DataTable LocationsTable = VSWebBL.SecurityBL.LocationsBL.Ins.GetAllData(); if (LocationsTable.Rows.Count > 0) { LocationComboBox.DataSource = LocationsTable; LocationComboBox.TextField = "Location"; LocationComboBox.ValueField = "ID"; LocationComboBox.DataBind(); } } catch (Exception ex) { //6/27/2014 NS added for VSPLUS-634 Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); } }
private void InitDBControls() { //Required Fields AssetTagTextBox.SetDBInfo(DevicesBaseCols.AssetTag, true); SerialTextBox.SetDBInfo(DevicesBaseCols.Serial, true); CurrentUserTextBox.SetDBInfo(DevicesBaseCols.CurrentUser, true); DescriptionTextBox.SetDBInfo(DevicesBaseCols.Description, true); PurchaseDatePicker.SetDBInfo(DevicesBaseCols.PurchaseDate, true); EquipTypeComboBox.SetDBInfo(DevicesBaseCols.EQType, Attributes.DeviceAttributes.EquipType, true); LocationComboBox.SetDBInfo(DevicesBaseCols.Location, Attributes.DeviceAttributes.Locations, true); OSVersionComboBox.SetDBInfo(DevicesBaseCols.OSVersion, Attributes.DeviceAttributes.OSType, true); StatusComboBox.SetDBInfo(DevicesBaseCols.Status, Attributes.DeviceAttributes.StatusType, true); //Non-required and Misc Fields PONumberTextBox.SetDBInfo(DevicesBaseCols.PO, false); ReplaceYearTextBox.SetDBInfo(DevicesBaseCols.ReplacementYear, false); PhoneNumberTextBox.SetDBInfo(DevicesBaseCols.PhoneNumber, false); GuidLabel.SetDBInfo(DevicesBaseCols.DeviceGuid, ParseType.DisplayOnly, false); TrackableCheckBox.SetDBInfo(DevicesBaseCols.Trackable, false); HostnameTextBox.SetDBInfo(DevicesBaseCols.HostName, false); iCloudTextBox.SetDBInfo(DevicesBaseCols.iCloudAccount, false); }
protected void Page_Load(object sender, EventArgs e) { if (!SearchState.ValidateResultsPageParameters(Request.Params)) { Response.Redirect("Default.aspx"); } State = new SearchState("Results", Request.Params, new HotelBookingDataContextExt()); if (!IsPostBack) { LocationComboBox.DataBindItems(); LocationComboBox.SelectedItem = LocationComboBox.Items.FindByValue(State.Metro_Area.ID); NightlyRateTrackBar.MaxValue = Math.Floor(State.Metro_Area.MaxRoomPrice); NightlyRateTrackBar.MinValue = Math.Floor(State.Metro_Area.MinRoomPrice); NightlyRateTrackBar.PositionStart = GetDecimalValue(State.FilterMinPrice, NightlyRateTrackBar.MinValue, NightlyRateTrackBar.MaxValue, NightlyRateTrackBar.MinValue); NightlyRateTrackBar.PositionEnd = GetDecimalValue(State.FilterMaxPrice, NightlyRateTrackBar.MinValue, NightlyRateTrackBar.MaxValue, NightlyRateTrackBar.MaxValue); CustomerRatingTrackBar.Position = GetDecimalValue(State.FilterCustomerRating, CustomerRatingTrackBar.MinValue, CustomerRatingTrackBar.MaxValue, CustomerRatingTrackBar.MinValue); LocationRatingComboBox.Value = State.FilterLocationRating ?? "BBB"; MapImage.ImageUrl = State.Metro_Area.Map_ImageUrl; for (int i = 0; i < 5; i++) { OurRatingCheckBoxList.Items[i].Selected = State.FilterOurRatingArray.Contains(i + 1); } EnsureTokensList(false); } var hotels = FindHotels().ToList(); HotelsDataView.DataSource = hotels; HotelsDataView.DataBind(); HotelsCountLabel.Text = String.Format("{0} CONSTRUCIONES", hotels.Count()); }