员工上班打卡系统 java_Java 员工打卡
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace 员工信息维护 { public partial class big : Form { public big() { InitializeComponent(); } //列表,用于保存 SE 对象 public ListprogrammerList = new List(); //刷新DataGrindView数据 public void BindGrid(Listlist) { this.dataGridView1.DataSource = new BindingList(list); } private void toolStripButton1_Click(object sender, EventArgs e) { join jj = new join(); //调用父窗体 jj.FrmParent = this; jj.Show(); } private void toolStripButton4_Click(object sender, EventArgs e) { DK dk = new DK(); dk.recordList = this.recordList; dk.Show(); } private void big_Load(object sender, EventArgs e) { //xianshi(); } //查询 private void button1_Click(object sender, EventArgs e) { ListtempList = new List(); foreach(SE item in this.programmerList){ if (item.no.IndexOf(this.textBox1.Text.Trim())!=-1) { tempList.Add(item); } this.dataGridView1.DataSource = new BindingList(tempList); } } private void toolStripButton3_Click(object sender, EventArgs e) { DialogResult re = MessageBox.Show("确认要删除该数据吗", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); if (re == DialogResult.OK) { foreach (SE item in this.programmerList) { if (dataGridView1.SelectedRows[0].Cells[0].Value==item.no) { programmerList.Remove(item); break; } } MessageBox.Show("删除成功"); this.dataGridView1.DataSource = new BindingList(programmerList); } //this.dataGridView1.DataSource = new BindingList(temp); } //签到 public DictionaryrecordList = new Dictionary(); private void 签到ToolStripMenuItem_Click(object sender, EventArgs e) { //验证是否有选中的行 if (this.dataGridView1.SelectedRows.Count != 1) { MessageBox.Show("请选中一行!"); return; } //确保没有签到过 string workNo = this.dataGridView1.CurrentRow.Cells[0].Value.ToString(); MessageBox.Show(workNo); foreach (string id in recordList.Keys) { if (workNo == id) { MessageBox.Show("您已经签到过了!"); return; } } //签到 Records record = new Records(); record.ID = workNo; record.Name = this.dataGridView1.CurrentRow.Cells[1].Value.ToString(); record.SignInTime = DateTime.Now; //添加签到信息到记录中 this.recordList.Add(record.ID, record); MessageBox.Show("签到成功!"); } private void 签退ToolStripMenuItem_Click(object sender, EventArgs e) { //验证是否有选中的行 if (this.dataGridView1.SelectedRows.Count != 1) { MessageBox.Show("请选中一行!"); return; } string ID = this.dataGridView1.CurrentRow.Cells["workNo"].Value.ToString(); //标识是否已签到过 bool isOut = false; //遍历key,与ID对比,若相等可以签退,反之不行. foreach (string key in recordList.Keys) { if (key == ID) { //签退时间 this.recordList[key].SignOutTime = DateTime.Now; MessageBox.Show("签退成功!"); isOut = true; break; } } if (!isOut) { MessageBox.Show("很抱歉,请签到!"); } } //签退 } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace 员工信息维护 { public partial class join : Form { // big FrmParent = new big (); //初始化 public join() { InitializeComponent(); this.comboBox1.SelectedIndex = 0; } //big FimParant=new big (); //保存父窗体的引用 public big FrmParent { get; set; } // public static ListprogrammerList=new List(); private void button1_Click(object sender, EventArgs e) { try { SE pp = new SE(); pp.no = this.textBox1.Text.Trim(); pp.age = Int32.Parse(this.textBox2.Text.Trim()); pp.sex = this.comboBox1.Text; pp.name = this.textBox3.Text; foreach (SE item in FrmParent.programmerList) { if (pp.no == item.no) { MessageBox.Show("此工号已存在"); return; } } FrmParent.programmerList.Add(pp); this.Close(); } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { //刷新父窗体信息 this.FrmParent.BindGrid(FrmParent.programmerList); } } } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace 员工信息维护 { public partial class DK : Form { public DictionaryrecordList { get; set; } public DK() { InitializeComponent(); } private void DK_Load(object sender, EventArgs e) { BindingSource bs = new BindingSource(); bs.DataSource = recordList.Values; this.dataGridView1.DataSource = bs; Rows(); } public void Rows() { int row = this.dataGridView1.RowCount; this.label1.Text = "共有" + row + "条打卡记录"; } } }
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 员工信息维护 { public class Records { public DateTime SignInTime { get; set; } public DateTime SignOutTime { get; set; } public string ID { get; set; } public string Name { get; set; } } }
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 员工信息维护 { public class SE { public string no { get; set; } public int age { get; set; } public string name { get; set; } public string sex { get; set; } } }
员工上班打卡系统 java_Java 员工打卡相关推荐
- 会员储值卡系统 java_java毕业设计_springboot框架的储值卡会员管理系统
今天介绍一个java毕设题目, 题目内容为springboot框架的储值卡会员管理系统, 是一个采用b/s结构的javaweb项目, 采用java语言编写开发工具eclipse, 项目框架jsp+sp ...
- linux查看sd卡系统类型,从SD卡启动linux系统
---------------------------------------------------------------------------------------------------- ...
- 教你30元自制考勤打卡系统!
2021年4月,为了简化班级早自习考勤签到流程,我利用校园卡,独立制作了一个简易考勤打卡系统.整个打卡系统一共花了我32元人民币. 首先我在网购软件上购买了一个能读取IC卡卡号的读卡器(现在网购软件上 ...
- bankPay_转卡系统/卡转卡系统/支付宝转卡系统/app自动回调
全自动收款系统/转卡系统源码/银行卡自动收款/卡转卡代收系统/卡转卡支付系统/卡转卡系统源码/转卡系统监控/转卡收款系统源码 软件架构 ●使用vue.element-ui.spring-boot技术 ...
- 张一鸣批员工上班时聊游戏:老板好不好,看员工敢不敢怼他
作者 | 霍辉 来源 | 猎聘(ID:liepinwang) 看一个老板怎么样,有一个便捷的方法,就是看员工敢不敢怼他,敢不敢讲真话.敢于直面问题,才能解决问题,有这样认知的老板,格局也差不到哪儿去. ...
- 企业员工福利积分商城系统:深耕福利场景,解锁福利采购新玩法!
近年来,经济结构升级,福利待遇增长明显,单靠高薪已较难留住公司的优秀人才.如何为企业员工提供更具吸引力的员工福利计划,逐渐成为许多企业人力资源管理战略的重要环节. 然而,企业管理者在面对员工福利时通常 ...
- 【毕业设计_课程设计】基于opencv、dilb的员工人脸识别考勤系统
文章目录 0 项目说明 1 需求分析 2 总体设计 3 详细设计 4 效果展示 5 实验心得 6 项目源码 7 最后 0 项目说明 基于opencv.dilb的员工人脸识别考勤系统 提示:适合用于课程 ...
- 5、员工上班时间的问题 - CEO之公司管理经验谈
员工上班时间一般是根据公司的规章制度来制定的.当然,在不同的地点也有不同的做法.比如北京.上海.广州.深圳这些重点的大点的城市,加班的时间就相对比较多一些.但是按照笔者的想法,一般是一天7-8小时工作 ...
- SAP HR系统如何处理员工月中调动问题
在SAP HR系统中,员工调动是指员工跨部门/单位的组织隶属关系变化,广义上说,还可以包括外派.借调和在部门内的岗位变动等人事调配活动.在SAP-HR中是通过人事事件来完成员工调动业务在系统中的操作, ...
最新文章
- LeetCode实战:买卖股票的最佳时机
- 深入剖析AQS和CAS,看了都说好
- 来自读者的面试题:谈谈Spring用到了哪些设计模式?
- java基础:13.1 集合框架 - ArrayList
- 从下往上看--新皮层资料的读后感 第一部分:皮层细胞
- java 上传文件到服务器_java上传文件到OSS云服务器(二)
- 场效应管P-MOS N-MOS
- 面向连接服务与无连接服务
- JS学习总结(6)——函数/弹出框
- 牛客网——与7无关的数
- Express框架学习笔记-模板引擎
- 在 Laravel 项目中使用 Elasticsearch 做引擎,scout 全文搜索(小白出品, 绝对白话)
- 如何在word里插入矢量图
- HZOI20190819模拟26题解
- [相机原理]单反与手机是如何实现对焦的?——反差对焦的原理
- GpuImage 在Android 上的应用以及各种效果参照表
- 阿里云快速搭建个人网站
- 批处理中的for详解
- 利用Python将选择题、多选题导入Anki
- python中range和arange的区别_浅谈Python中range与Numpy中arange的比较