예제 #1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit(String id)
        {
            //查询参数
            int selYear  = Utils.GetInt(Utils.GetQueryStringValue("selYear"));  //年
            int selMonth = Utils.GetInt(Utils.GetQueryStringValue("selMonth")); //月

            //绑定表格数据
            if (selYear >= 1 && selYear <= 9999 && selMonth >= 1 && selMonth <= 12)
            {
                //统计信息
                BAttendance      attBLL   = new BAttendance();
                MAttendanceAbout attModel = attBLL.GetAttendanceAbout(this.SiteUserInfo.CompanyId, id, selYear, selMonth);
                if (null != attModel)
                {
                    this.lbAttInfo.Text = string.Format("准点<strong class=\"red\">{0}</strong>天,迟到<strong class=\"red\">{1}</strong>天,早退<strong class=\"red\">{2}</strong>天,旷工<strong class=\"red\">{3}</strong>天,请假<strong class=\"red\">{4}</strong>天,加班<strong class=\"red\">{5}</strong>小时", attModel.Punctuality, attModel.Late, attModel.LeaveEarly, attModel.Absenteeism, Math.Round(attModel.Vacation, 1), Math.Round(attModel.OverTime, 1));
                }
                //表头编号
                List <string> lstDays = new List <string>();
                for (int i = 0; i < DateTime.DaysInMonth(selYear, selMonth); i++)
                {
                    lstDays.Add(i.ToString());
                }
                this.RepDateList.DataSource = lstDays;
                this.RepDateList.DataBind();
                //考勤状况
                this.RepList.DataSource = lstDays;
                this.RepList.DataBind();
            }
        }
예제 #2
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作ID</param>
        protected void PageInit(string id)
        {
            BAttendance BLL = new BAttendance();

            //统计信息(当月考勤情况)
            if (!string.IsNullOrEmpty(id))
            {
                EyouSoft.Model.GovStructure.MAttendanceAbout m = BLL.GetAttendanceAbout(this.SiteUserInfo.CompanyId, id, dt.Year, dt.Month);
                if (m != null)
                {
                    this.lbAttInfo.Text = string.Format("全勤<strong class=\"red\">{0}</strong>天,迟到<strong class=\"red\">{1}</strong>天,早退<strong class=\"red\">{2}</strong>天,旷工<strong class=\"red\">{3}</strong>天,请假<strong class=\"red\">{4}</strong>天,加班<strong class=\"red\">{5}</strong>小时,停职<strong class=\"red\">{6}</strong>天,出差<strong class=\"red\">{7}</strong>天,休假<strong class=\"red\">{8}</strong>天", m.Punctuality, m.Late, m.LeaveEarly, m.Absenteeism, Math.Round(m.Vacation, 1), Math.Round(m.OverTime, 1), Math.Round(m.Suspension, 1), Math.Round(m.Travel, 1), Math.Round(m.Rest, 1));
                }
            }
        }