欢迎来到天天文库
浏览记录
ID:17848563
大小:255.04 KB
页数:16页
时间:2018-09-07
《web应用开发技术实验报告》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、实验一:简单计算器实验代码:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;publicpartialclassc1:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}protectedvoidchange1(objectsender,EventArgse
2、){doublen1=double.Parse(t1.Text)+double.Parse(t2.Text);this.t4.Text=n1.ToString();}protectedvoidchange2(objectsender,EventArgse){doublen1=double.Parse(t1.Text)-double.Parse(t2.Text);this.t4.Text=n1.ToString();}protectedvoidchange3(objectsender,EventArgse){doublen1=double.Pa
3、rse(t1.Text)*double.Parse(t2.Text);this.t4.Text=n1.ToString();}protectedvoidchange4(objectsender,EventArgse){doublen1=double.Parse(t1.Text)/double.Parse(t2.Text);this.t4.Text=n1.ToString();}}界面:运行界面:实验二:个人所得税实验代码:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;
4、usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;publicpartialclasstax_Default:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}protectedvoidButton1_Click(objectsender,EventArgse){doublea=Convert.ToDouble(TextBox1.Text);doublec=a-3500;if(
5、c<=0){TextBox1.Text="工¤资哩?收?入?大洙?于?500才?纳é税°,?清?重?新?输?入?";}elseif(c<=1500){TextBox4.Text=Convert.ToString(c*0.03);TextBox5.Text=Convert.ToString(a-c*0.03);/*将?一?个?基ù本?数簓据Y类え?型í转羇为a另ⅷ?一?个?基ù本?类え?型í,?*将?指?定¨的?双?精?度è浮?点?数簓的?值μ转羇换?其?等台?效§的?字?符?串?表括?示?形?式?*/}elseif(15006、500){TextBox4.Text=Convert.ToString(c*0.1-105);TextBox5.Text=Convert.ToString(a-(c*0.1-105));}elseif(45007、);TextBox5.Text=Convert.ToString(a-(c*0.25-1005));}elseif(350008、0.35-5505));}elseif(80000
6、500){TextBox4.Text=Convert.ToString(c*0.1-105);TextBox5.Text=Convert.ToString(a-(c*0.1-105));}elseif(45007、);TextBox5.Text=Convert.ToString(a-(c*0.25-1005));}elseif(350008、0.35-5505));}elseif(80000
7、);TextBox5.Text=Convert.ToString(a-(c*0.25-1005));}elseif(350008、0.35-5505));}elseif(80000
8、0.35-5505));}elseif(80000
此文档下载收益归作者所有