打卡系统

首先不良表现他是面试的早晚,他一身正装,干净,一体面庄重正经,笑得时候特别尴尬。

图片 1

其次次于相他,我曾经跻身外的单位,他是本人领导,我师兄。开会常,他坐于自身对面,他开拓计算机,整理资料,认真,专注。偶尔抬头,四目相对,我不好意思地转移了头,面红耳赤。拍照留念,我找找了单离开他有些距离的职务,因为自身怕我会见不轻松。散会,我说,师兄一般都使宴请的,他开心的语气地游说好啊,后来总体部门便自身并未让他请求,我借口说那天忙。

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 frmMaintance
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
this.dgvProgrammer.AutoGenerateColumns = false;
}
public List<SE> programmerList = new List<SE>();

老三不成会,我正式开班工作,签到,做会议记录,他站在本人旁边,玩手机,我乐着说,师兄,说好的开会不可知打手机为。他痞痞地说:“谁,是哪位在玩手机。”我哈呵笑,“不明白呀,你怎么耍赖你麻麻知道吗。”

private Dictionary<string, Record> recordList = new
Dictionary<string, Record>();
public void BindGrid(List<SE> list)
{
this.dgvProgrammer.DataSource = new BindingList<SE>(list);
}

季不好会晤,我说师哥你还缺少自己同暂停饭,他说“那走咯,请你吃晚饭。”我呵呵说“现在才四点,不然你发给红包安慰安慰自己。”我真没有勇气单独和你用。

private void frmMain_Load(object sender, EventArgs e)
{

第五差会面,我们机关7只小伙伴在体育场聊天,听歌,安安静静的夜,习习凉风,很舒心,这一刻专门怀念即便这样一辈子。你及小叶斗嘴,玩闹,耍流氓,你们四目相对,说正家门的特产,我明明感觉到空气受暧昧的气,你特别好,她性吧招人喜爱,我恍然看你们真的坏相似配,好怀念告诉他们“你们当协同吧。”散场时,你们并清除活动,我于你们身后,我用起相机,拍下这么好看的背影。

}

自我的男孩,美丽之女孩,一定要幸福,才未辜负自己收藏于怎么老以来的首先差脸红。

private void tsbtnAdd_Click(object sender, EventArgs e)
{
frmMaintance frm = new frmMaintance();
frm.MaintaceType = 1;
frm.FrmParent = this;
frm.ShowDialog();

图片 2

}

private void tsbtnDelete_Click(object sender, EventArgs e)
{
if (this.dgvProgrammer.SelectedRows.Count != 1)
{
MessageBox.Show(“请选中一行!”);
return;
}

DialogResult rt = MessageBox.Show(“确实如去这个员工的音讯也?”,
“确认消息”);
if (rt != DialogResult.OK)
{
return;
}

string workNo =
dgvProgrammer.CurrentRow.Cells[“workNo”].Value.ToString();

foreach (SE obj in programmerList)
{
if (obj.Id == workNo)
{
this.programmerList.Remove(obj);
break;
}
}

this.BindGrid(this.programmerList);
MessageBox.Show(“删除成功!”, “执行信息”);
}

private void btnQuery_Click(object sender, EventArgs e)
{
List<SE> tempList = new List<SE>();
foreach(SE item in this.programmerList){
if (item.Id.IndexOf(this.txtID.Text.Trim()) != -1)
{
tempList.Add(item);
}
}
this.dgvProgrammer.DataSource = new BindingList<SE>(tempList);
}

private void tsmiSignIn_Click(object sender, EventArgs e)
{
if(this.dgvProgrammer.SelectedRows.Count!=1){
MessageBox.Show(“请选中一行!”);
return;
}
string workNo =
dgvProgrammer.CurrentRow.Cells[“workNo”].Value.ToString();

foreach(string id in recordList.Keys){
if(workNo==id){
MessageBox.Show(“您都立过了!”);
return;
}
}
Record record = new Record();
record.Id = workNo;
record.Name =
dgvProgrammer.CurrentRow.Cells[“name”].Value.ToString();
record.SignInTime = DateTime.Now;
this.recordList.Add(record.Id,record);
MessageBox.Show(“签到成功!”) ;
}

private void tsmiSignOut_Click(object sender, EventArgs e)
{
if(this.dgvProgrammer.SelectedRows.Count!=1){
MessageBox.Show(“请选中一行!”);
return;
}
string ID =
dgvProgrammer.CurrentRow.Cells[“workNo”].Value.ToString();
bool isOut = false;
foreach(string key in recordList.Keys){
if(key==ID){
this.recordList[key].SignOutTime = DateTime.Now;
MessageBox.Show(“签退成功!”);
isOut = true;
break;
}
}
if(!isOut){
MessageBox.Show(“很对不起,尚未签到!”);
}
}

private void tbtnShowCardRecord_Click(object sender, EventArgs e)
{
frmmainready frm = new frmmainready();
frm.recordList = this.recordList;
frm.ShowDialog();
}

}
}

图片 3

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 frmMaintance
{
public partial class frmmainready : Form
{
public frmmainready()
{
InitializeComponent();
}

public Dictionary<string,Record> recordList { get; set; }

private void frmmainready_Load(object sender, EventArgs e)
{
this.lbtitle.Text =
string.Format(“共有{0}条记录”,this.recordList.Count);
BindingSource bs = new BindingSource();
bs.DataSource = recordList.Values;
dgvRecords.DataSource = bs;
}

}
}

图片 4

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 frmMaintance
{
public partial class frmMaintance : Form
{
public frmMain frmMain;

public frmMaintance()
{
InitializeComponent();
this.comboBox1.SelectedIndex = 0;
}
public int MaintaceType { get;set; }

public frmMain FrmParent { get; set; }
private void frmMaintance_Load(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
try
{
SE pr = new SE();
pr.Id =this.txt.Text.Trim();
pr.Age = Int32.Parse(this.textBox2.Text.Trim());
if (this.comboBox1.SelectedItem.ToString() == “男”)
{
pr.Gender = Gender.男;
}
else
{
pr.Gender = Gender.女;
}
pr.Name = this.textBox3.Text.Trim();
foreach(SE item in FrmParent.programmerList){
if(item.Id==pr.Id){
MessageBox.Show(“此工号已经在!”);
return;
}
}
FrmParent.programmerList.Add(pr);
this.Close();
}
catch(Exception ex)
{
MessageBox.Show(“出错”+ex.Message);
}
finally
{
this.FrmParent.BindGrid(FrmParent.programmerList);
}

}
}
}