基于web的财务管理系统源代码

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1.考勤记录查询ImportsSystemImportsSystem.DataImportsSystem.Data.SqlClientPartialClassaddkaoqinInheritsSystem.Web.UI.PageProtectedSubButton1_Click(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesButton1.ClickDimconnAsSqlConnectionDimconstrAsStringconstr=server=localhost;database=user;uid=sa;pwd=430281199001125746conn=NewSqlConnection(constr)conn.Open()DimsqlAsString=select*fromuserwherettime='+TextBox3.Text+'DimcmdAsNewSqlCommand(sql,conn)DimdrAsSqlDataReader=cmd.ExecuteReader()Ifdr.Read()=TrueThenResponse.Write(时间不对!)ElseDimcountAsIntegerdr.Dispose()Dimsql1AsString=insertintouser(员工ID,名字,考勤时间,考勤类型)values('&TextBox1.Text&','&TextBox1.Text&','&TextBox3.Text&','&TextBox4.Text&')Dimcmd1AsNewSqlCommand(sql1,conn)count=cmd1.ExecuteNonQuery()Ifcount=1ThenResponse.Write(考勤记录添加成功!)ElseResponse.Write(考勤记录添加失败!)EndIfEndIfconn.Close()EndSubProtectedSubPage_Load(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesMe.LoadEndSubProtectedSubButton3_Click(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesButton3.ClickSqlDataSource1.SelectCommand=select*fromkaoqinwhere员工ID='+TextBox1.Text+'or姓名='+TextBox1.Text+'or考勤时间='+TextBox3.Text+'or考勤类别='+TextBox4.Text+'EndSubProtectedSubGridView1_PageIndexChanging(ByValsenderAsObject,ByValeAsSystem.Web.UI.WebControls.GridViewPageEventArgs)HandlesGridView1.PageIndexChangingGridView1.PageIndex=e.NewPageIndexGridView1.DataBind()EndSubEndClass2.工资管理界面代码ImportsSystemImportsSystem.DataImportsSystem.Data.SqlClientPartialClassgongziInheritsSystem.Web.UI.PageProtectedSubButton1_Click(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesButton1.ClickDimconnAsSqlConnectionDimconstrAsStringconstr=server=QT-201205020917;database=user;uid=sa;pwd=430281199001125746conn=NewSqlConnection(constr)conn.Open()DimsqlAsString=select*fromgongziwhere姓?名?='+TextBox1.Text+'DimcmdAsNewSqlCommand(sql,conn)DimdrAsSqlDataReader=cmd.ExecuteReader()Ifdr.Read()=TrueThenResponse.Write(名字不对!)ElseDimcountAsIntegerdr.Dispose()Dimsql1AsString=insertintouser(姓?名?,性?别Àe,工¡è资Á¨º)values('&TextBox1.Text&','&TextBox1.Text&','&TextBox3.Text&')Dimcmd1AsNewSqlCommand(sql1,conn)count=cmd1.ExecuteNonQuery()Ifcount=1ThenResponse.Write(工资添加成功!)ElseResponse.Write(工资添加失败!)EndIfEndIfconn.Close()EndSubProtectedSubButton3_Click(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesButton3.ClickSqlDataSource1.SelectCommand=select*fromgongziwhere姓名='+TextBox1.Text+'EndSubProtectedSubGridView1_SelectedIndexChanged(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesGridView1.SelectedIndexChangedEndSubEndClass3.管理员模块代码ImportsSystemImportsSystem.DataImportsSystem.Data.SqlClientPartialClassadduserInheritsSystem.Web.UI.PageProtectedSubTextBox2_TextChanged(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesTextBox2.TextChangedEndSubProtectedSubButton1_Click(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesButton1.ClickIfSession(TextBox1)=ThenResponse.Redirect(adduser.aspx)ElseDimconnAsSqlConnectionDimconstrAsStringconstr=server=localhost;database=Admin;uid=sa;pwd=430281199001125746conn=NewSqlConnection(constr)conn.Open()DimsqlAsString=select*fromuserwheretid='+TextBox1.Text+'DimcmdAsNewSqlCommand(sql,conn)DimdrAsSqlDataReader=cmd.ExecuteReader()Ifdr.Read()=TrueThenResponse.Write(此用户已经存在!)ElseDimcountAsIntegerdr.Dispose()Dimsql1AsString=insertintouser(员工ID,名字,性别,部门,联系电话)values('&TextBox1.Text&','&TextBox2.Text&','&TextBox3.Text&','&TextBox4.Text&','&TextBox5.Text&')Dimcmd1AsNewSqlCommand(sql1,conn)count=cmd1.ExecuteNonQuery()Ifcount=1ThenResponse.Write(用户添加成功!)ElseResponse.Write(用户添加失败!)EndIfEndIfconn.Close()EndIfEndSubProtectedSubPage_Load(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesMe.LoadEndSubEndClass

1 / 6
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功