/// <summary> /// Constructor /// </summary> /// <param name="callsign">The unique identification code of the resource</param> /// <param name="info">A container object that stores detailed appliance information</param> public Appliance(string callsign, ApplianceInfo info) : base(callsign, info.Name, info.MobilePhoneNumber, info.Base, info.CurrentAddress, info.CurrentResourceStatus, info.AssignedIncident) { this.applianceDatabase = Tools.ApplianceDB; this.info = info; //find the related incidentDataView object this.viewData = Tools.Appliances.Single(x => x.CallSign == callsign); }
private void Button_Click(object sender, RoutedEventArgs e) { ApplianceDataView appliance = (ApplianceDataView)ComboBoxResources.SelectedItem; string type = ComboBoxMessageType.SelectedItem.ToString(); int user = Properties.Settings.Default.LoggedInUserId; if (textBoxMessage.Text.Count() > 0) { Incident incident = new Incident(appliance.Incident); incident.EnterMessage(user, textBoxMessage.Text, type, appliance.CallSign); } this.Close(); }