Mr. Zhang and Cui yingying say twists. Finally the lovers end up married. But the life of man is true. Even better is that people do not have a room without a car is not good, so the last Zhang Ti-li Ying asked to enter the preparation ceremony, dowry in line with their own requirements. To marry Mr. Zhang, assuming that the dowry does not and his own mind, the monk shaved as a nun. Never talk about marriage for a lifetime! With this as the story background today we will talk about the three-storey study.
Cui Yingying want to eagerly, in ancient between men and women is not direct contact, so Mr. Zhang invited the king to give Baomei. Her old age can not do physical work, she found a pick-up workers to help her pick dowry. Pay for the pick-up workers from their matchmaker money. This is the main task in the story, and here are some of the roles they play in the three floor.
The three-layer division is designed for high-cohesion, low-coupling ideas, so the hierarchy of points is often divided into the presentation layer (UI), the Business Logic layer (BLL), and the data Access Layer (DAL).
1, the presentation layer (UI): Popular speaking is to show the user interface. That is what the user sees when he or she is using a system .
2, the Business Logic layer (BLL): For the detailed problem of operation, but also can be said to the data layer operation, the data business logic processing.
3, data access Layer (DAL): This layer of transactions directly manipulate the database, for data additions, deletions, changes, lookups and so on.
Characters in the story play a role: Mr. Zhang (UI), Wang (BLL), Cui Yingying (DAL). The rest of the job is to play the physical layer. The physical layer is strictly not a layer. We prefer to call it entity class. It is used to store data in the three layer of the jump up, with all the layers can deal with.
Let's see if Mr. Zhang and Cui yingying can tie the knot!
Between men and women is often the woman is more shy (of course, can not rule out the women of today's society), so Mr. Zhang to take the initiative to ask Wang to help her it (U layer to refer to B-layer). Mrs. Wang to take the dowry to find Cui yingying it, the front said the woman shy so Wang to take the initiative to send the dowry, talent know is not Cui Yingying want gift (b layer to refer to D layer). The pick-and-go workers follow the king to pick the dowry shuttle between Mr. Zhang and Cui yingying. So Mr. Zhang, Cui Yingying, and Wang have to rely on the pick-and-go (three layers to refer to the physical layer).
Assuming that the king with the dowry to go, and Cui Yingying's will, then this marriage even became, assuming Cui yingying see the dowry not mind, then just can be a monk!
<span style= "FONT-FAMILY:KAITI_GB2312;FONT-SIZE:18PX;" > //u layer code private void Button1_Click (object sender, EventArgs e) { string giftname = TextBox1.Text.Trim (); Wang Po. xiapin xp = new King. Xiapin (); if (XP. Xiapin (giftname) ==true) { MessageBox.Show ("it success!"); } else { MessageBox.Show ("or shaved! "); } } </span>
<span style= "FONT-FAMILY:KAITI_GB2312;FONT-SIZE:18PX;" >//b Layer Code Public bool Xiapin (string giftname) { cui Ying ying. Gift Gift = new Cui Ying Ying. Gift (); Pick. Shipping. Giftinfo Pinli = gift. Selectgift (giftname); if (Pinli! = null) { return true; } else { return false; } } </span>
<span style= "FONT-FAMILY:KAITI_GB2312;FONT-SIZE:18PX;" >//D Layer code public pick. Shipping. Giftinfo selectgift (String giftname) {using (SqlConnection conn = new SqlConnection (Gongju. connstring)) {Conn. Open (); String strsql= "Select Giftname from Giftinfo WHERE [email protected]"; SqlCommand cmd = new SqlCommand (strsql,conn); Cmd. Parameters.Add (New SqlParameter ("@GiftName", Giftname)); SqlDataReader reader = cmd. ExecuteReader (); Pick. Shipping. Giftinfo gift = null; while (reader. Read ()) {if (gift ==null) {gift = new pick. Shipping . Giftinfo (); } gift. Giftname = reader. GetString (0); } return gift; }}</span>
<span style= "FONT-FAMILY:KAITI_GB2312;FONT-SIZE:18PX;" >//entity Layer Code Public class Giftinfo {public string Giftname {get; set;} } </span>
Saying that Mr. Zhang one night to prepare for the dowry is gold million two. And Cui Yingying's heart (which woman does not love Wealth):
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxmdkynjk2na==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
It is a pity to pick the sinister designs. The king knocked Dizzy and took the dowry to flee. Mr. Zhang can hold the original pledge of two people "mouth fat five inch" to it:
Hey!
The reality is so cruel!
!!
Copyright notice: This article Bo Master original article. Reprint please indicate the source. Thank you!
Cui Yingying to Soong, Zhang What do you think?