Beispiel #1
0
        private void RestoreQueryCondition()
        {
            if (this.ViewState["_StockQueryCondition"].ToString() != string.Empty)
            {
                StockQueryCondition qc = new StockQueryCondition();

                qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

                this.txtStockCode.Text         = qc.StockCode;
                this.txtStockName.Text         = qc.StockName;
                this.DatePickerFrom.DateTime   = qc.DatePickerFrom;
                this.DatePickerTo.DateTime     = qc.DatePickerTo;
                this.DatePickerSearch.DateTime = qc.DatePickerSearch;

                for (int i = 0; i < this.DropDownListType.Items.Count; i++)
                {
                    if (this.DropDownListType.Items[i].Value == qc.BuyPoint)
                    {
                        this.DropDownListType.SelectedIndex = i;
                        break;
                    }
                }

                qc.Dispose();
            }
        }
Beispiel #2
0
        /// <summary>
        /// 还原界面查询条件
        /// </summary>
        private void RestoreQueryCondition()
        {
            if (this.ViewState["_StockQueryCondition"].ToString() != string.Empty)
            {
                StockQueryCondition qc = new StockQueryCondition();

                qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

                this.txtStockCode.Text       = qc.StockCode;
                this.txtStockName.Text       = qc.StockName;
                this.DatePickerFrom.DateTime = qc.DatePickerFrom;
                this.DatePickerTo.DateTime   = qc.DatePickerTo;

                for (int i = 0; i < this.DropDownListCategory.Items.Count; i++)
                {
                    if (this.DropDownListCategory.Items[i].Value == qc.Market)
                    {
                        this.DropDownListCategory.SelectedIndex = i;
                        break;
                    }
                }

                for (int i = 0; i < this.DropDownListField.Items.Count; i++)
                {
                    if (this.DropDownListField.Items[i].Value == qc.Field)
                    {
                        this.DropDownListField.SelectedIndex = i;
                        break;
                    }
                }

                for (int i = 0; i < this.DropDownListProvince.Items.Count; i++)
                {
                    if (this.DropDownListProvince.Items[i].Value == qc.Province)
                    {
                        this.DropDownListProvince.SelectedIndex = i;
                        break;
                    }
                }

                for (int i = 0; i < this.DropDownListChart.Items.Count; i++)
                {
                    if (this.DropDownListChart.Items[i].Value == qc.Chart)
                    {
                        this.DropDownListChart.SelectedIndex = i;
                        break;
                    }
                }

                qc.Dispose();
            }
        }
        /// <summary>
        /// 还原界面查询条件
        /// </summary>
        private void RestoreQueryCondition()
        {
            if (this.ViewState["_StockQueryCondition"].ToString() != string.Empty)
            {
                StockQueryCondition qc = new StockQueryCondition();

                qc.DeserializeFromString(this.ViewState["_StockQueryCondition"].ToString());

                this.txtStockCode.Text       = qc.StockCode;
                this.DatePickerFrom.DateTime = qc.DatePickerFrom;
                qc.Dispose();
            }
        }