收藏 分销(赏)

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

上传人:精*** 文档编号:5176453 上传时间:2024-10-28 格式:DOC 页数:6 大小:32.04KB
下载 相关 举报
基于web的财务管理系统源代码.doc_第1页
第1页 / 共6页
基于web的财务管理系统源代码.doc_第2页
第2页 / 共6页
基于web的财务管理系统源代码.doc_第3页
第3页 / 共6页
基于web的财务管理系统源代码.doc_第4页
第4页 / 共6页
基于web的财务管理系统源代码.doc_第5页
第5页 / 共6页
点击查看更多>>
资源描述

1、1. 考勤记录查询Imports SystemImports System.DataImports System.Data.SqlClientPartial Class addkaoqin Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn As SqlConnection Dim constr As String constr = server = localhost

2、;database = user;uid=sa;pwd=430281199001125746 conn = New SqlConnection(constr) conn.Open() Dim sql As String = select * from user where ttime= + TextBox3.Text + Dim cmd As New SqlCommand(sql, conn) Dim dr As SqlDataReader = cmd.ExecuteReader() If dr.Read() = True Then Response.Write(时间不对!) Else Dim

3、 count As Integer dr.Dispose() Dim sql1 As String = insert into user(员工ID,名字,考勤时间,考勤类型) values ( & TextBox1.Text & , &TextBox1.Text & , & TextBox3.Text & , & TextBox4.Text & ) Dim cmd1 As New SqlCommand(sql1, conn) count = cmd1.ExecuteNonQuery() If count = 1 Then Response.Write(考勤记录添加成功!) Else Respo

4、nse.Write(考勤记录添加失败!) End If End If conn.Close() End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click SqlDataSource1.SelectCommand = select *

5、from kaoqin where 员工ID= + TextBox1.Text + or 姓名= + TextBox1.Text + or 考勤时间= + TextBox3.Text + or 考勤类别= + TextBox4.Text + End Sub Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging GridView1

6、.PageIndex = e.NewPageIndex GridView1.DataBind() End SubEnd Class2. 工资管理界面代码Imports SystemImports System.DataImports System.Data.SqlClientPartial Class gongzi Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn A

7、s SqlConnection Dim constr As String constr = server = QT-05020917;database = user;uid=sa;pwd=430281199001125746 conn = New SqlConnection(constr) conn.Open() Dim sql As String = select * from gongzi where 姓?名?= + TextBox1.Text + Dim cmd As New SqlCommand(sql, conn) Dim dr As SqlDataReader = cmd.Exec

8、uteReader() If dr.Read() = True Then Response.Write(名字不对!) Else Dim count As Integer dr.Dispose() Dim sql1 As String = insert into user(姓?名?,性?别e,工资) values ( & TextBox1.Text & , &TextBox1.Text & , & TextBox3.Text & ) Dim cmd1 As New SqlCommand(sql1, conn) count = cmd1.ExecuteNonQuery() If count = 1

9、 Then Response.Write(工资添加成功!) Else Response.Write(工资添加失败!) End If End If conn.Close() End Sub Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click SqlDataSource1.SelectCommand = select * from gongzi where 姓名= + TextBox1.Text + End Sub Protected Sub G

10、ridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged End SubEnd Class3. 管理员模块代码Imports SystemImports System.DataImports System.Data.SqlClientPartial Class adduser Inherits System.Web.UI.Page Protected Sub TextBox2_TextChanged(ByVal

11、 sender As Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click If Session(TextBox1) = Then Response.Redirect(adduser.aspx) Else Dim conn As SqlConnection Dim constr As String

12、constr = server = localhost;database = Admin;uid=sa;pwd=430281199001125746 conn = New SqlConnection(constr) conn.Open() Dim sql As String = select * from user where tid= + TextBox1.Text + Dim cmd As New SqlCommand(sql, conn) Dim dr As SqlDataReader = cmd.ExecuteReader() If dr.Read() = True Then Resp

13、onse.Write(此顾客已经存在!) Else Dim count As Integer dr.Dispose() Dim sql1 As String = insert into user(员工ID,名字,性别,部门,联系电话) values ( & TextBox1.Text & , & TextBox2.Text & , & TextBox3.Text & , & TextBox4.Text & , & TextBox5.Text & ) Dim cmd1 As New SqlCommand(sql1, conn) count = cmd1.ExecuteNonQuery() If count = 1 Then Response.Write(顾客添加成功!) Else Response.Write(顾客添加失败!) End If End If conn.Close() End If End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End SubEnd Class

展开阅读全文
部分上传会员的收益排行 01、路***(¥15400+),02、曲****(¥15300+),
03、wei****016(¥13200+),04、大***流(¥12600+),
05、Fis****915(¥4200+),06、h****i(¥4100+),
07、Q**(¥3400+),08、自******点(¥2400+),
09、h*****x(¥1400+),10、c****e(¥1100+),
11、be*****ha(¥800+),12、13********8(¥800+)。
相似文档                                   自信AI助手自信AI助手
搜索标签

当前位置:首页 > 学术论文 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服