private void InitializeBindInput() { this.TextBoxSerial.Text = string.Empty; this.TextBoxMinimumA.Text = string.Empty; this.TextBoxMaximumA.Text = string.Empty; this.TextBoxMinimumB.Text = string.Empty; this.TextBoxMaximumB.Text = string.Empty; if (!string.IsNullOrEmpty(this.DropDownListDetectors.SelectedValue)) { DetectorBusiness business = new DetectorBusiness(); string guid = this.DropDownListDetectors.SelectedValue; Detector value = business.QueryByGuid(guid); if (value != null) { this.DropDownListRooms.SelectedValue = value.Machine.RoomId; this.InitializeBindMachine(); this.DropDownListMachines.SelectedValue = value.MachineId; this.DropDownListDetectorTypes.SelectedValue = value.DetectorTypeId; this.TextBoxSerial.Text = value.Serial.ToString(); this.TextBoxMinimumA.Text = value.MinimumA.ToString(); this.TextBoxMaximumA.Text = value.MaximumA.ToString(); this.TextBoxMinimumB.Text = value.MinimumB.ToString(); this.TextBoxMaximumB.Text = value.MaximumB.ToString(); } } }