public PrimaryFormPoints(PrimaryIncident primaryIncident) { _ToneAlertUsed = primaryIncident.ToneAlertUsed; _Priority = primaryIncident.Priority; _SunstarThreeDigitUnit = primaryIncident.Sunstar3DigitUnit; _Location = primaryIncident.Location; _MapGrid = primaryIncident.MapGrid; _NatureOfCall = primaryIncident.NatureOfCall; _SsTacChannel = primaryIncident.SSTacChannel; _DisplayedServiceAttitude = primaryIncident.DisplayedServiceAttitude; _UsedCorrectVolTone = primaryIncident.UsedCorrectVolumeTone; _UsedProhibitedBehavior = primaryIncident.UsedProhibitedBehavior; }
public static void PrimaryIncident_Update(PrimaryIncident input) { SqlConnection connection = new SqlConnection(_ConnectionString); SqlCommand command = new SqlCommand("PrimaryIncident_Update", connection); command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("PrimaryIncidentId", input.PrimaryIncidentId); command.Parameters.AddWithValue("@ChannelId", input.Channel.ChannelId); command.Parameters.AddWithValue("@DispatcherId", input.Dispatcher.DispatcherId); command.Parameters.AddWithValue("@ShiftId", input.Shift.ShiftId); command.Parameters.AddWithValue("@DateTime", input.DateTime); command.Parameters.AddWithValue("@ToneAlertUsed", input.ToneAlertUsed); command.Parameters.AddWithValue("@Priority", input.Priority); command.Parameters.AddWithValue("@Sunstar3DigitNumber", input.Sunstar3DigitUnit); command.Parameters.AddWithValue("@Location", input.Location); command.Parameters.AddWithValue("@MapGrid", input.MapGrid); command.Parameters.AddWithValue("@NatureOfCall", input.NatureOfCall); command.Parameters.AddWithValue("@SSTacChannel", input.SSTacChannel); command.Parameters.AddWithValue("@PertinentIntRouting", input.PertinentIntRouting); command.Parameters.AddWithValue("@InfoGivenOutOfOrder", input.InfoGivenOutOfOrder); command.Parameters.AddWithValue("@DisplayedServiceAttitude", input.DisplayedServiceAttitude); command.Parameters.AddWithValue("@UsedCorrectVolumeTone", input.UsedCorrectVolumeTone); command.Parameters.AddWithValue("@UsedProhibitedBehavior", input.UsedProhibitedBehavior); SqlUtility.ExecuteNonQuery(command); }
public static PrimaryIncident GetPrimaryIncident(Guid incidentId) { PrimaryIncident returnValue = new PrimaryIncident(); DataSet primaryIncidentDataSet = Data.Provider.PrimaryIncident_SelectById(incidentId); returnValue.PrimaryIncidentId = new Guid(primaryIncidentDataSet.Tables[0].Rows[0]["PrimaryIncidentId"].ToString()); returnValue.Channel = GetChannel(int.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["ChannelId"].ToString())); returnValue.Dispatcher = GetDispatcher(primaryIncidentDataSet.Tables[0].Rows[0]["DispatcherId"].ToString()); returnValue.Shift = GetShift(int.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["ShiftId"].ToString())); returnValue.DateTime = DateTime.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["DateTime"].ToString()); returnValue.ToneAlertUsed = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["ToneAlertUsed"].ToString()); returnValue.Priority = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["Priority"].ToString()); returnValue.Sunstar3DigitUnit = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["Sunstar3DigitNumber"].ToString()); returnValue.Location = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["Location"].ToString()); returnValue.MapGrid = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["MapGrid"].ToString()); returnValue.NatureOfCall = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["NatureOfCall"].ToString()); returnValue.SSTacChannel = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["SSTacChannel"].ToString()); returnValue.PertinentIntRouting = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["PertinentIntRouting"].ToString()); returnValue.InfoGivenOutOfOrder = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["InfoGivenOutOfOrder"].ToString()); returnValue.DisplayedServiceAttitude = primaryIncidentDataSet.Tables[0].Rows[0]["DisplayedServiceAttitude"].ToString(); returnValue.UsedCorrectVolumeTone = primaryIncidentDataSet.Tables[0].Rows[0]["UsedCorrectVolumeTone"].ToString(); returnValue.UsedProhibitedBehavior = bool.Parse(primaryIncidentDataSet.Tables[0].Rows[0]["UsedProhibitedBehavior"].ToString()); return returnValue; }