Data separation in MVC project
Note: The following takes the PNR query function in the aircraft electronic ticket system as an example to separate the data of the unissued PNR.
1. Before the separation of passenger information, the passenger PNR query must be performed to query the number of passengers in the PNR. Because the passenger information has been queried before, a variable is declared to obtain the number of passengers.
PassengerNum is equal to the length of PassengerInfors to get the number of passengers.
Judge whether passengerNum is greater than one. If it is less than one, it means that there is only one passenger, and the data separation operation cannot be performed and jump to the PNR separation page.
Pass the jump page,
get the PNR number and status,
get the checked passenger information traversal cycle, and the
data verification
New object is used to store the returned data. After the
PNR is separated, it becomes a new PNR, so save and add.
When PNRStatus == 0 indicates the current has been taken PNR
cancellation, when PNRStatus == 2 indicates that the PNR when there are two or among more than one passenger PNR has been ticketed passenger, when the PNR represents the PNRStatus == 3 All tickets have been issued successfully and cannot be separated.