/// <summary> /// 获取考勤日期 /// </summary> /// <param name="minDt">最小考勤日期</param> /// <param name="maxDt">最大考勤日期</param> /// <returns></returns> private bool GetAttenDateDt(DateTime minDt, DateTime maxDt) { bool flag = false; m_AttenDateDt = m_mainDbOp.GetDataTable(Common.Table_AttenDate, string.Format("{0} between #{1}# and #{2}# order by {0} asc", Common.Column_AttendanceDate, minDt.ToString("yyyy-MM-dd"), maxDt.ToString("yyyy-MM-dd"), Common.Column_AttendanceDate)); if (m_AttenDateDt == null || m_AttenDateDt.Rows.Count == 0) { XtraMessageBox.Show("考勤日期未配置,请先生成", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); AttenDateForm attenDateForm = new AttenDateForm(m_mainDbOp); if (attenDateForm.ShowDialog() != DialogResult.OK) { return(flag); } else { m_AttenDateDt = m_mainDbOp.GetDataTable(Common.Table_AttenDate, string.Format("{0} between #{1}# and #{2}# order by {0} asc", Common.Column_AttendanceDate, minDt.ToString("yyyy-MM-dd"), maxDt.ToString("yyyy-MM-dd"), Common.Column_AttendanceDate)); if (m_AttenDateDt == null || m_AttenDateDt.Rows.Count == 0) { return(flag); } else { flag = true; } } } else { flag = true; } return(flag); }
/// <summary> /// 生成考勤日期 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSetAttenDate_ItemClick(object sender, ItemClickEventArgs e) { AttenDateForm SetAttenDate = new AttenDateForm(m_MianDbOp); if (SetAttenDate.ShowDialog() != DialogResult.OK) { return; } }