示例#1
0
        protected override void Update(string conditionSql, int unionType, string comboValue)
        {
            string sql = SqlForOrderHistory.GetListSql(conditionSql);

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

            orderHistory.DataContext = table;
        }
示例#2
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 = SqlForOrderHistory.GetStartSql((DateTime)this.dateStart.SelectedDate);
                    values.Add(sql);
                }
                if (this.dateEnd.SelectedDate != null)
                {
                    string sql = SqlForOrderHistory.GetEndSql((DateTime)this.dateEnd.SelectedDate);
                    values.Add(sql);
                }
            }

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

            //  着部署
            if (this.checkToSect.IsChecked == true)
            {
                string sql = SqlForOrderHistory.GetToSectSql((int)this.comboToSect.SelectedValue);
                values.Add(sql);
            }

            //  MU
            if (this.checkMu.IsChecked == true)
            {
                string sql = SqlForOrderHistory.GetMuSql((int)this.comboMu.SelectedValue);
                values.Add(sql);
            }

            //  カート
            if (this.checkCart.IsChecked == true)
            {
                string sql = SqlForOrderHistory.GetCartSql((int)this.comboCart.SelectedValue);
                values.Add(sql);
            }

            return(string.Join(" and ", values));
        }