C#公司考勤管理系统的设计实现+流程图+ER图(13)
时间:2016-11-23 19:05 来源:毕业论文 作者:毕业论文 点击:次
DateTime End = Convert.ToDateTime(String.Format("{0}-{1}-{2} 23:59:59", KeyTime.Year, KeyTime.Month, KeyTime.Day)); var WorkList = _DbEntities.WorkOrder.Where(p => p.W_UserName == UserName && p.W_Time >= Begin && p.W_Time <= End).ToList(); if (WorkList.Count != 0) { foreach (var temp in WorkList) { DataRow NewRow = _Result.NewRow(); NewRow[0] = String.Format("{0:yyyy-MM-dd}", KeyTime); NewRow[1] = temp.W_Type; _Result.Rows.Add(NewRow); } } else { var LeaveList = _DbEntities.Leave.Where(p => p.L_UserName == UserName && p.L_Time >= Begin && p.L_Time <= End).ToList(); if (LeaveList.Count != 0) { DataRow NewRow = _Result.NewRow(); NewRow[0] = String.Format("{0:yyyy-MM-dd}", KeyTime); NewRow[1] = "请假"; _Result.Rows.Add(NewRow); } else { DataRow NewRow = _Result.NewRow(); NewRow[0] = String.Format("{0:yyyy-MM-dd}", KeyTime); (责任编辑:qin) |