public Response_Team_Information_Form(Emergency xEmergency, Response_Team xRT, ref Shared_Data xSD) : this(ref xSD) { InitializeComponent(); Name = "Receive Call"; Emergency = xEmergency; Response_Team = xRT; // RE-DO THIS int j = 0; for (int i = 0; i < SD.OpenForms.GetLength(0); i++) { if (SD.OpenForms[0, i] != null) { j++; } } CWFs = new Emergency_Management_Form[j]; for (int i = 0; i < SD.OpenForms.GetLength(0); i++) { if (SD.OpenForms[0, i] != null) { CWFs[i] = (Emergency_Management_Form)SD.OpenForms[0, i]; } } }
// // SETs & GETs //To set up Add segment public void Setup_Control(ref Special_List <Emergency_Call> xCalls, ref Emergency_Call xEC) { EmergencyCalls = xCalls; Current_Call = xEC; Current_Emergency = new Emergency(); // Generating a unique Emergency ID int tempID = 0; for (int a = 0; a < EmergencyCalls.Count; a++) { if (EmergencyCalls[a].GetEmergency().GetEmergency_ID() >= tempID) { tempID = xCalls[a].GetEmergency().GetEmergency_ID(); } } Current_Emergency.SetEmergency_ID(tempID + 1); txtEmergencyID.Text = Current_Emergency.GetEmergency_ID().ToString(); callControlView.Setup_Control(Current_Call, "Overview", 0); // Setting the view segment Button btnTemp = new Button(); btnTemp.Name = "btnSegment" + 0; btnTemp.Text = "Add"; Change_Segment(btnTemp, null); }
private void PopulateFields(Emergency xEmergency) { txtEmergencyID.Text = xEmergency.GetEmergency_ID().ToString(); if (xEmergency.GetEType() != string.Empty) { cboEmergencyType.SelectedItem = xEmergency.GetEType(); } }
private void SetSegment_Add(ref Emergency xEmergency) { EnabledControls(true); PopulateFields(xEmergency); pnlSpecs.Visible = true; pnlAddEmergencyBtn.Visible = true; pnlRelatedData.Visible = true; cboEmergencyType.Focus(); }
public void SetEmergency(Emergency xEmergency) { Emergency = xEmergency; }
public void SetEmergency(Emergency xEmergency) { EmergencyLinked = xEmergency; Call_Updated?.Invoke(this, null); }
// public Emergency_Call() { Emergency_Caller = new Caller(); EmergencyLinked = new Emergency(); }