收藏 分销(赏)

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

上传人:精*** 文档编号:5176453 上传时间:2024-10-28 格式:DOC 页数:6 大小:32.04KB 下载积分:6 金币
下载 相关 举报
基于web的财务管理系统源代码.doc_第1页
第1页 / 共6页
基于web的财务管理系统源代码.doc_第2页
第2页 / 共6页


点击查看更多>>
资源描述
1. 考勤记录查询 Imports System Imports System.Data Imports System.Data.SqlClient Partial 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;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 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 Response.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 * 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.PageIndex = e.NewPageIndex GridView1.DataBind() End Sub End Class 2. 工资管理界面代码 Imports System Imports System.Data Imports System.Data.SqlClient Partial 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 As 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.ExecuteReader() 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 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 GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged End Sub End Class 3. 管理员模块代码 Imports System Imports System.Data Imports System.Data.SqlClient Partial Class adduser Inherits System.Web.UI.Page Protected Sub TextBox2_TextChanged(ByVal 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 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 Response.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 Sub End Class
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

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

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

关于我们      便捷服务       自信AI       AI导航        抽奖活动

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

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

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

关注我们 :微信公众号    抖音    微博    LOFTER 

客服