• 大小: 16.42MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-31
  • 语言: C#
  • 标签: c#  

资源简介

员工考勤管理系统源码(c#)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace 员工考勤管理系统
{
    public partial class Attendance : Form
    {
        public Attendance()
        {
            InitializeComponent();
        }//_来_自_5_1_a_s_p_x
        
        /// 
        /// 初始化加载员工签到签离界面
        /// 

        /// 
        /// 
        private void Attendance_Load(object sender EventArgs e)
        {
            label1.BackColor = Color.Transparent;

            this.panel1.Visible = true;
            this.panel2.Visible = false;
            this.panel1.BackColor = Color.Transparent;
            this.panel2.BackColor = Color.Transparent;
            timer1.Enabled = true;
            timer1.Interval = 100;
            timer1.Tick += new EventHandler(time1_Tick);
            reLoadTime();

        }
        private void time1_Tick(object sender EventArgs e)
        {
            this.label4.Text = DateTime.Now.Hour.ToString() + “时“ + DateTime.Now.Minute.ToString()+“分“+DateTime.Now.Second.ToString()+“秒“;

        }
        /// 
        /// 签到
        /// 

        /// 
        /// 
        private void button1_Click_1(object sender EventArgs e)
        {
            string number = this.textBox1.Text.Trim();
            if (number == string.Empty)
            {
                MessageBox.Show(“请输入员工编号!“);
                return;
            }
            else
            {

                int ii;
                if (int.TryParse(number out ii))  //bool
                {
                    int intnumber = Convert.ToInt32(number);
                    string sql = “select count(Time_EmployeeId)as IdCount from Timetable where Time_EmployeeId=@employeeid“;
                    DataTable dt = DbHelper.Instance.CreateDataTable(sql new SqlParameter(“employeeid“ intnumber));
                    int count = Convert.ToInt32(dt.Rows[0][“IdCount“]);
                   
                    DateTime date = DateTime.Now.Date;
                    DateTime time2 = DateTime.Now;
                    
                    if (count == 0)
                    {
                        MessageBox.Show(“员工编号不存在“);
                        //DateTime time = DateTime.Now.Date;
                        //MessageBox.Show(time.ToString(“yyyy-MM-dd“));rn
                        return;
                    }
                    else
                    {
                        
                        
                            DateTime nowdate = DateTime.Now.Date;

                            
                           
                            string sql_date = “select count(Time_Date)as counttime from T

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        2176  2012-07-02 10:40  51Aspx源码必读.txt
     文件         403  2012-07-02 10:40  App.config
     文件       32038  2012-07-02 10:40  appicon.ico
     文件       20781  2012-07-02 10:40  Attendance.cs
     文件       17912  2012-07-02 10:40  Attendance.Designer.cs
     文件       29484  2012-07-02 10:40  Attendance.resx
     文件         913  2012-07-02 10:40  CheckExist.cs
     文件       22885  2012-07-02 10:40  CreateExcel.cs
     文件        2730  2012-07-02 10:40  CreateExcel.designer.cs
     文件        6020  2012-07-02 10:40  CreateExcel.resx
     文件       20480  2012-07-02 10:40  Database1.sdf
     文件       20480  2012-07-02 10:40  Database2.sdf
     文件       15525  2012-07-02 10:40  DbHelper.cs
     文件         388  2012-07-02 10:40  DeleteRecord.cs
     文件        7659  2012-07-02 10:40  DeleteRecord.Designer.cs
     文件        5817  2012-07-02 10:40  DeleteRecord.resx
     文件         384  2012-07-02 10:40  DeleteUser.cs
     文件        4528  2012-07-02 10:40  DeleteUser.Designer.cs
     文件        5817  2012-07-02 10:40  DeleteUser.resx
     文件       18637  2012-07-02 10:40  EmployeeForm.cs
     文件       14614  2012-07-02 10:40  EmployeeForm.Designer.cs
     文件        6011  2012-07-02 10:40  EmployeeForm.resx
     文件       28021  2012-07-02 10:40  EmployeeInfo .cs
     文件       29324  2012-07-02 10:40  EmployeeInfo .Designer.cs
     文件       67875  2012-07-02 10:40  EmployeeInfo .resx
     文件        4945  2012-07-02 10:40  from.gif
     文件        2001  2012-07-02 10:40  HelpForm.cs
     文件        4407  2012-07-02 10:40  HelpForm.Designer.cs
     文件       31633  2012-07-02 10:40  HelpForm.resx
     文件         390  2012-07-02 10:40  H_TimeSetForm.cs
     文件        2992  2012-07-02 10:40  H_TimeSetForm.Designer.cs
............此处省略237个文件信息

评论

共有 条评论