CPMSystem/USL/Clock.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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 CompanyPersonnelManagementSystem
{
    public partial class Clock : Form
    {
       
        string staffid;
        public Clock(string staffid)
        {
            InitializeComponent();
           
            this.staffid = staffid;
        }
        DateTime time;//记录当前时间
        ClickCardOpt Copt = new ClickCardOpt();//处理打卡业务
        private void Clock_timer_Tick(object sender, EventArgs e)
        {
            time = DateTime.Now;
            Clock_Timetxt.Clear();
            Clock_Timetxt.Text = time.ToString();
        }

        private void Clock_Load(object sender, EventArgs e)
        {
            time = DateTime.Now;
            Clock_Timetxt.Text = time.ToString();
        }
      
        private void Clock_SDKbtn_Click(object sender, EventArgs e)
        {
            int hour = Convert.ToInt32(time.Hour);

            if (hour < 6 || hour >= 12) //6-12点打上班卡时间,到12点不能再打卡
            {
                MessageBox.Show("抱歉,现在不是打卡时间!");
            }
            else
            {
                string workingtime = GetWorkingTime("上班");
                string[] worktimes = workingtime.Split(':');
                int workhour = Convert.ToInt32(worktimes[0]);
                int workminute = Convert.ToInt32(worktimes[1]);

                StartClockRecord srecord = new StartClockRecord();
                srecord.SClockTime = time;
                srecord.StaffID = staffid;
                if (time.Hour > workhour || time.Hour == workhour && time.Minute > workminute)
                {
                    srecord.SClockstatusID = 2;
                }
                else
后面还有 75 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。