protected void btnSearch_Click(object sender, EventArgs e) { bool?isEquity = null; if (DropDownListSecurityType.SelectedValue == "E") { isEquity = true; } else if (DropDownListSecurityType.SelectedValue == "B") { isEquity = false; } else { isEquity = null; } int hedgefundId = Convert.ToInt16(DropDownListHedgefund.SelectedValue); try { _dtEquityPool = DataService.GetInstance().GetFundSecurityPoolHistory(TextBoxStockcode.Text.ToString().Trim().ToUpper() , Convert.ToDateTime(TextBoxStartDate.Text) , Convert.ToDateTime(TextBoxEndDate.Text) , isEquity, hedgefundId ); //foreach (DataRow oRow in _dtEquityPool.Rows) //{ // oRow["URL"] = "Detail.aspx?code=" + oRow["s_info_windcode"].ToString() // + "&IndustryOrRating=" + oRow["s_info_indexcode"].ToString() // + "&IsEquity=1"; //} GridViewFundEquityPool.DataSource = _dtEquityPool; GridViewFundEquityPool.DataBind(); lblMsg.Text = "共" + _dtEquityPool.Rows.Count + "条记录"; } catch (Exception ex) { lblMsg.Text = ex.Message; } }
protected void btnSearch_Click(object sender, EventArgs e) { bool inBasePool = true, inCorePool = true, inRestPool = false, inProhPool = false; int hedgefundId = Convert.ToInt16(DropDownListHedgefund.SelectedValue); switch (DropDownListPoolType.SelectedValue.ToString()) { case "1100": //核心库 inBasePool = true; inCorePool = true; inRestPool = false; inProhPool = false; break; case "1000": //基础库 inBasePool = true; inCorePool = false; inRestPool = false; inProhPool = false; break; case "0010": //限制库 inBasePool = false; inCorePool = false; inRestPool = true; inProhPool = false; break; case "0001": //禁止库 inBasePool = false; inCorePool = false; inRestPool = false; inProhPool = true; break; default: inBasePool = false; inCorePool = false; inRestPool = false; inProhPool = false; break; } try { _dtBondPool = DataService.GetInstance().GetFundSecurityPool(TextBoxStockcode.Text.ToString().Trim().ToUpper() , TextBoxRating.Text , inBasePool, inCorePool, inRestPool, inProhPool , Convert.ToInt16(DropDownListAnalyst.SelectedValue) , false , Convert.ToDateTime(TextBoxStartDate.Text) , Convert.ToDateTime(TextBoxEndDate.Text) , hedgefundId ); foreach (DataRow oRow in _dtBondPool.Rows) { oRow["URL"] = "Detail.aspx?code=" + oRow["s_info_windcode"].ToString() + "&IndustryOrRating=" + oRow["SW_IND_NAME1"].ToString() + "&hedgefundId=" + hedgefundId + "&IsEquity=0"; } GridViewFundEquityPool.DataSource = _dtBondPool; GridViewFundEquityPool.DataBind(); lblMsg.Text = "共" + _dtBondPool.Rows.Count + "条记录"; aPrint.HRef = "Print.aspx?code=" + TextBoxStockcode.Text.ToString().Trim().ToUpper() + "&IndustryOrRating=" + TextBoxRating.Text + "&pool=" + DropDownListPoolType.SelectedValue.ToString() + "&analystId=" + DropDownListAnalyst.SelectedValue + "&hedgefundId=" + hedgefundId + "&IsEquity=0" + "&startdate=" + TextBoxStartDate.Text + "&enddate=" + TextBoxEndDate.Text ; } catch (Exception ex) { lblMsg.Text = ex.Message; } }