C#公司考勤管理系统的设计实现+流程图+ER图(14)
时间:2016-11-23 19:05 来源:毕业论文 作者:毕业论文 点击:次
NewRow[1] = "没有排班"; _Result.Rows.Add(NewRow); } } this.dataGridView1.AutoGenerateColumns = false; this.dataGridView1.DataSource = _Result; 3.5.2 月考勤报表 图13 会员付款管理 根据部门、员工姓名、年、月组合查询统计生成员工月考勤报表的具体业务逻辑实现如下所示: string UserName = this.comboBox2.SelectedValue.ToString(); DateTime Begin = Convert.ToDateTime(String.Format("{0}-{1}-1 0:00:00", this.comboBox3.Text, this.comboBox4.Text)); DateTime End = Convert.ToDateTime(String.Format("{0}-{1}-30 23:59:59", this.comboBox3.Text, this.comboBox4.Text)); var WorkObject = _DbEntities.WorkOrder.Where(p => p.W_UserName == UserName && p.W_Time >= Begin && p.W_Time <= End).ToList(); foreach (var temp in WorkObject) { DataRow NewRow = _Result.NewRow(); NewRow[0] = String.Format("{0:yyyy-MM-dd}", temp.W_Time); NewRow[1] = temp.W_Type; _Result.Rows.Add(NewRow); } this.dataGridView1.AutoGenerateColumns = false; this.dataGridView1.DataSource = _Result; 3.5.3 登入统计 图14 登入统计 员工登入统计的业务逻辑具体实现如下: DateTime Begin = Convert.ToDateTime(String.Format("{0}-{1}-1 0:00:00", this.comboBox3.Text, this.comboBox4.Text)); DateTime End = Convert.ToDateTime(String.Format("{0}-{1}-30 23:59:59", this.comboBox3.Text, this.comboBox4.Text)); this.dataGridView1.AutoGenerateColumns = false; this.dataGridView1.DataSource = _DbEntities.Sign.Where(p => p.S_Time >= Begin && p.S_Time <= End).ToList(); 4 总结 (责任编辑:qin) |