Example #1
0
        /// <summary>
        /// 検索条件SQLを取得
        /// </summary>
        /// <returns></returns>
        public override string GetConditionSql()
        {
            List <string> values = new List <string>();

            //  検索期間
            if (this.checkStartEnd.IsChecked == true)
            {
                if (this.dateStart.SelectedDate != null)
                {
                    string sql = SqlForAbsenceHistory.GetStartSql((DateTime)this.dateStart.SelectedDate);
                    values.Add(sql);
                }
                if (this.dateEnd.SelectedDate != null)
                {
                    string sql = SqlForAbsenceHistory.GetEndSql((DateTime)this.dateEnd.SelectedDate);
                    values.Add(sql);
                }
            }

            //  発部署
            if (this.checkReqSect.IsChecked == true)
            {
                string sql = SqlForAbsenceHistory.GetSectSql((int)this.comboReqSect.SelectedValue);
                values.Add(sql);
            }


            return(string.Join(" and ", values));
        }
        /// <summary>
        /// 一覧更新
        /// </summary>
        /// <param name="conditionSql"></param>
        /// <param name="unionType"></param>
        protected override void Update(string conditionSql, int unionType, string comboValue)
        {
            string sql = SqlForAbsenceHistory.GetListSql(conditionSql, comboValue);

            System.Data.DataTable table = m_db.getDataTable(sql);

            absenceHistory.DataContext = table;
        }