Realize the mini program for personal income tax, using the vs.net and .NET framework, you will experience BREW and J2ME that use Microsoft .NET architecture, can be said to be a kind of enjoyment. Using system.drawing; using system.collections; using system.windows.form; using system.data;
namespace SmartDeviceApplication personal income {///
Public form1 () {/// Required for Windows Form Designer Support // InitializationComponent ();
// // Todo: add any constructor code after initializecomponent call ///} ///
////////////////Bobox1.items.add ("Beijing"); this.comboBox1.items.Add ("Shanghai"); this.comboBox1.items.Add ("Shenzhen"); this.comboBOX1. Items.Add ("Other Regions"); this.comboBox1.Location = new system.drawing.point (16, 96); this.comboBox1.size = new system.drawing.size (128, 26); //// Label1 // this.label1.location = new system.drawing.point (16, 8); this.label1.size = new system.drawing.size (104, 22); this.label1.text = "Your income" ; // // label2 // this.label2.Location = new system.drawing.point (16, 72); this.label2.size = new system.drawing.size (96, 22); this.label2.text = "Your area"; //// Panel1 // this.Panel1.controls.add (this.label3); this.panel1.location = new system.drawing.point (24, 40); this.Panel1.size = New System.drawing.Size (112, 112); this.Panel1.visible = false; // // Label3 // THISTEM.DRAWING.POINT (16, 24); this.label3. Size = new system.drawing.size (80, 80); this.label3.text = "label3"; th Is.label3.visible = false; /// mainmenu2 // this.mainMenu2.Menuitems.add (this.MenuItem3); // // Menuitem3 // this.Menuitem3.Text = "OK"; this.Menuitem3.click = new system.eventhandler (this.Menuitem3_click); // // Form1 // this.backcolor = system.drawing.color = system.drawing.color.gainsboro; this.clientsize = new system.drawing.size (170, 183); this.Controls .Add (this.Panel1); this.controls.add (this.label2); this.controls.add (this.label1); this.controls.add (this.comboBox1); this.Controls.add (this.TextBox1 ); This.Menu = this.mainMenu1; this.Text = "
Personal income tax calculation ";} #ENDREGION
///
Static void main () {Application.run (New Form1 ());}
Private void menuitem1_click (object sender, system.eventargs e) {Application.exit ();}
Private void menuitem2_click (object sender, system.eventargs e) {CAL (); this.Menu = this.mainMenu2; {V1 = 1000;} if (this.comboBox1.selected "== 1) {v1 = 1000;} if (this.comboBox1.selected" == 2) {v1 = 1600;} float v2 = float.parse (this.TextBox1 .Text.trim ()); if (Float.isnan (V2)) {Alert ("Enter the wage, salaries"); return;} float v3 = V2-v1; float result = 0; if (V3 < = 0) {Result = 0; Alert ("You need to pay personal income tax:" Result.Tostring () "yuan"); return;} if (v3 <= 500) {result = v3 * 0.05f; alert "You need to pay personal income tax:" Result.toString () "yuan"); Return;} if (v3 <= 2000) {result = v3 * 0.1f-25; Alert ("You need to pay personal income tax:" Result.toString () "yuan"); return;} if (v3 <= 5000) {result = v3 * 0.15f-125; Alert ("You need to pay personal income tax:" Result.toString () " Yuan "); Return;} IF (v3 <= 20000) {result = V3 * 0.2F-375; Alert (" You need to pay personal income tax: " Result. Totring () "yuan"); return;} if (v3 <= 40000) {result = V3 * 0.25f-1375; Alert ("You need to pay personal income tax:" Result.toString () "yuan") }}}} (V3 <= 60000) {result = V3 * 0.3F-3375; Alert ("You need to pay personal income tax:" Result.toString () "yuan"); return;} if (v3 < = 80000) {Result = V3 * 0.35F-6375; Alert ("You need to pay personal income tax:" Result.toTRING () "yuan"); return;} if (v3 <=
100000) {Result = V3 * 0.4F-10375; Alert ("You need to pay personal income tax:" Result.Tostring () "yuan"); return;} result = v3 * 0.45f-15375; alert ("you Personal income taxes need to be paid: " Result.toString () " yuan "); return;} catch {Alert (" Enter the wage, the salary is incorrect "); return;}}
Private void alert (string str) {this.label3.text = str; this.Panel1.visible = true; this.label3.visible = true;
Private void menuitem3_click (object sender, system.eventargs e) {this.Panel1.visible = false; this.Label3.visible = false; this.Menu = this.mainMenu1;}}}