protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { this.ReportID = 1; this.Options = QueryItemAction.QueryValidItems(this.ReportID); QueryItem queryItem = new QueryItem(); queryItem.ItemName = ""; queryItem.ItemValue = ""; queryItem.Join = JoinType.And; queryItem.Operator = ""; this.ItemList = new QueryItemCollection { queryItem }; this.dgdQuery_Bind(); this.dgdQuery_Disable(); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { this.ReportID = Convert.ToInt32(base.Request["reportid"]); this.Options = QueryItemAction.QueryValidItems(this.ReportID); QueryItemCollection queryItemCollection = new QueryItemCollection(); for (int i = 0; i < this.Options.Rows.Count; i++) { queryItemCollection.Add(new QueryItem { ItemName = this.Options.Rows[i]["TermName"].ToString(), ItemSign = "", ItemValue = "", StrSql = this.Options.Rows[i]["StrSql"].ToString(), ToolTip = this.Options.Rows[i]["ToolTip"].ToString(), DataType = (int)this.Options.Rows[i]["DataType"], IsEmpty = (bool)this.Options.Rows[i]["IsEmpty"] }); } this.ItemList = queryItemCollection; this.dgdQuery_Bind(); } }