前面例子的实战版本

ContractedBlock.gifExpandedBlockStart.gif.aspx.cs
  1None.gifusing System;
  2None.gifusing System.Collections;
  3None.gifusing System.ComponentModel;
  4None.gifusing System.Data;
  5None.gifusing System.Data.SqlClient;
  6None.gifusing System.Drawing;
  7None.gifusing System.Web;
  8None.gifusing System.Web.SessionState;
  9None.gifusing System.Web.UI;
 10None.gifusing System.Web.UI.WebControls;
 11None.gifusing System.Web.UI.HtmlControls;
 12None.gif
 13None.gifusing Test1.ItemplateTest;
 14None.gif
 15None.gifnamespace Test1
 16ExpandedBlockStart.gifContractedBlock.gifdot.gif{
 17ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
 18InBlock.gif    /// ScoreTable 的摘要说明。
 19ExpandedSubBlockEnd.gif    /// </summary>

 20InBlock.gif    public class ScoreTable : System.Web.UI.Page
 21ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
 22InBlock.gif        protected System.Web.UI.WebControls.Button Button1;
 23InBlock.gif        protected System.Web.UI.WebControls.DataGrid grdTextAnserScore;
 24InBlock.gif    
 25InBlock.gif        private void Page_Load(object sender, System.EventArgs e)
 26ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 27InBlock.gif            DataSet demand = getData();//得到数据源
 28InBlock.gif
 29InBlock.gif            //为Datagrid添加列
 30InBlock.gif            addColumsForDataGrid(grdTextAnserScore,demand);
 31InBlock.gif            //创建虚拟数据表,用做数据源
 32InBlock.gif            DataTable dt = createDataTable(demand);
 33InBlock.gif            //得到包下所有供应商信息
 34InBlock.gif            DataTable dtProv = getProvsInPack("bfee693b-25c0-4080-8edb-ece782f09ad8");
 35InBlock.gif            //为虚拟表添加数据
 36InBlock.gif            DataTable dtFilled = FillDataTable(dtProv,dt,demand);
 37InBlock.gif            //绑定DataGrid
 38InBlock.gif            grdTextAnserScore.DataSource = dtFilled;
 39InBlock.gif            grdTextAnserScore.DataBind();
 40ExpandedSubBlockEnd.gif        }

 41InBlock.gif
 42ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
 43InBlock.gif        /// 描述:得到分类、要求信息
 44InBlock.gif        /// 作者:南守拥
 45InBlock.gif        /// 时间:2006年12月26日
 46InBlock.gif        /// </summary>
 47ExpandedSubBlockEnd.gif        /// <returns></returns>

 48InBlock.gif        private DataSet getData()
 49ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 50InBlock.gif            //DataGrid表头
 51InBlock.gif            //包下有那些供应商
 52InBlock.gif            SqlConnection con = new SqlConnection("Persist Security Info=false;Data Source=192.168.0.9;Initial Catalog=TjgpE;User ID=sa;Password=;");
 53InBlock.gif            SqlDataAdapter da = new SqlDataAdapter("",con);
 54InBlock.gif            //包文本应答项
 55InBlock.gif            //要求分类信息
 56InBlock.gif            da.SelectCommand.CommandText = "select distinct PK_DemandKindID,DemandKindName from V_StockItem_StockPack_Demand_BidValue_Resp where FK_StockPackID = 'bfee693b-25c0-4080-8edb-ece782f09ad8'and FK_ResponseID = '0'";
 57InBlock.gif            DataSet demand = new DataSet();
 58InBlock.gif            da.Fill(demand,"Kind");
 59InBlock.gif            //要求信息
 60InBlock.gif            da.SelectCommand.CommandText = "select distinct PK_DemandKindID,DemandName,PK_StockPack_DemandID,FK_DemandInfoID from V_StockItem_StockPack_Demand_BidValue_Resp where FK_StockPackID = 'bfee693b-25c0-4080-8edb-ece782f09ad8' and FK_ResponseID = '0'";
 61InBlock.gif            da.Fill(demand,"Info");
 62InBlock.gif            //加要求分类与要求关系
 63InBlock.gif            demand.Relations.Add("KindAndInfo",demand.Tables["Kind"].Columns["PK_DemandKindID"],demand.Tables["Info"].Columns["PK_DemandKindID"]); 
 64InBlock.gif            
 65InBlock.gif            return demand;
 66ExpandedSubBlockEnd.gif        }

 67InBlock.gif
 68InBlock.gif
 69ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
 70InBlock.gif        /// 描述:为DataGrid添加列
 71InBlock.gif        /// 作者:南守拥
 72InBlock.gif        /// 时间:2006年12月16日
 73InBlock.gif        /// </summary>
 74InBlock.gif        /// <param name="myGrid">要添加列的DataGrid</param>
 75ExpandedSubBlockEnd.gif        /// <param name="demand">数据源</param>

 76InBlock.gif        private void addColumsForDataGrid(DataGrid myGrid,DataSet demand)
 77ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 78InBlock.gif            foreach(DataRow rowKind in demand.Tables["Kind"].Rows)//分类
 79ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
 80InBlock.gif                foreach(DataRow rowInfo in rowKind.GetChildRows("KindAndInfo"))    //要求
 81ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
 82InBlock.gif                    //Datagrid添加应答列
 83InBlock.gif                    TemplateColumn tc1 = new TemplateColumn();
 84InBlock.gif                    string columName = "Anser" + rowInfo["DemandName"].ToString();
 85InBlock.gif                    tc1.ItemTemplate = new CTemplateColLabel(columName);
 86InBlock.gif                    tc1.ItemStyle.Wrap = false;
 87InBlock.gif                    grdTextAnserScore.Columns.Add(tc1);
 88InBlock.gif                    //Datagrid添加打分列
 89InBlock.gif                    TemplateColumn tc2 = new TemplateColumn();
 90InBlock.gif                    string columNamePoint = "Point" + rowInfo["DemandName"].ToString();
 91InBlock.gif                    tc2.ItemTemplate = new CTemplateCol(columNamePoint);
 92InBlock.gif                    tc2.ItemStyle.Wrap = false;
 93InBlock.gif                    grdTextAnserScore.Columns.Add(tc2);
 94InBlock.gif
 95ExpandedSubBlockEnd.gif                }

 96ExpandedSubBlockEnd.gif            }

 97ExpandedSubBlockEnd.gif        }

 98InBlock.gif
 99InBlock.gif
100ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
101InBlock.gif        /// 描述:创建虚拟表
102InBlock.gif        /// 作者:南守拥
103InBlock.gif        /// 时间:2006年12月26日
104InBlock.gif        /// </summary>
105InBlock.gif        /// <param name="demand">数据源</param>
106ExpandedSubBlockEnd.gif        /// <returns>虚拟DataTable</returns>

107InBlock.gif        private DataTable createDataTable(DataSet demand)
108ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
109InBlock.gif            DataTable myTable = new DataTable();
110InBlock.gif
111InBlock.gif            DataColumn columProvID = new DataColumn();
112InBlock.gif            columProvID.ColumnName = "ProvID";
113InBlock.gif            myTable.Columns.Add(columProvID);//添加供应商ID列
114InBlock.gif
115InBlock.gif            DataColumn columProvName = new DataColumn();
116InBlock.gif            columProvName.ColumnName = "ProvName";
117InBlock.gif            myTable.Columns.Add(columProvName);//添加供应商名称列
118InBlock.gif
119InBlock.gif            foreach(DataRow rowKind in demand.Tables["Kind"].Rows)//分类
120ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
121InBlock.gif                foreach(DataRow rowInfo in rowKind.GetChildRows("KindAndInfo"))    //要求
122ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
123InBlock.gif                    DataColumn colum = new DataColumn();
124InBlock.gif                    colum.ColumnName = "Anser" + rowInfo["DemandName"].ToString();
125InBlock.gif                    myTable.Columns.Add(colum);
126ExpandedSubBlockEnd.gif                }

127ExpandedSubBlockEnd.gif            }
 
128InBlock.gif            return myTable;
129ExpandedSubBlockEnd.gif        }

130InBlock.gif
131InBlock.gif
132ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
133InBlock.gif        /// 描述:得到包下的所有供应商
134InBlock.gif        /// 作者:南守拥
135InBlock.gif        /// 时间:2006年12月26日
136InBlock.gif        /// </summary>
137InBlock.gif        /// <param name="packid">包ID</param>
138ExpandedSubBlockEnd.gif        /// <returns></returns>

139InBlock.gif        private DataTable getProvsInPack(string packid)
140ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
141InBlock.gif            SqlConnection con = new SqlConnection("Persist Security Info=false;Data Source=192.168.0.9;Initial Catalog=TjgpE;User ID=sa;Password=;");
142InBlock.gif            SqlDataAdapter da = new SqlDataAdapter("select distinct Txt_ProvID,txt_name_ch from V_StockItem_StockPack_Demand_BidValue_Resp where FK_StockPackID = 'bfee693b-25c0-4080-8edb-ece782f09ad8' and FK_ResponseID = '0'",con);
143InBlock.gif            DataTable dt = new DataTable();
144InBlock.gif            da.Fill(dt);
145InBlock.gif            return dt;
146ExpandedSubBlockEnd.gif        }

147InBlock.gif
148InBlock.gif
149ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
150InBlock.gif        /// 描述:为虚拟表添加数据
151InBlock.gif        /// 作者:南守拥
152InBlock.gif        /// 时间:2006年12月26日
153InBlock.gif        /// </summary>
154InBlock.gif        /// <param name="provs"></param>
155InBlock.gif        /// <param name="myTable"></param>
156ExpandedSubBlockEnd.gif        /// <returns></returns>

157InBlock.gif        private DataTable FillDataTable(DataTable provs,DataTable myTable,DataSet source)
158ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
159InBlock.gif            foreach(DataRow row in provs.Rows)
160ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
161InBlock.gif                DataRow newRow = myTable.NewRow();//创建新行
162InBlock.gif                //添加供应商ID
163InBlock.gif                newRow["ProvID"= row["Txt_ProvID"];
164InBlock.gif                //添加供应商名称
165InBlock.gif                newRow["ProvName"= row["txt_name_ch"];
166InBlock.gif                foreach(DataRow rowKind in source.Tables["Kind"].Rows)//分类
167ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
168InBlock.gif                    foreach(DataRow rowInfo in rowKind.GetChildRows("KindAndInfo"))    //要求
169ExpandedSubBlockStart.gifContractedSubBlock.gif                    dot.gif{
170InBlock.gif                        newRow["Anser" + rowInfo["DemandName"].ToString()] = GetResponseInfo("bfee693b-25c0-4080-8edb-ece782f09ad8",row["Txt_ProvID"].ToString(),rowInfo["FK_DemandInfoID"].ToString());
171ExpandedSubBlockEnd.gif                    }

172ExpandedSubBlockEnd.gif                }

173InBlock.gif                myTable.Rows.Add(newRow);
174ExpandedSubBlockEnd.gif            }

175InBlock.gif            return myTable;
176ExpandedSubBlockEnd.gif        }

177InBlock.gif
178ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
179InBlock.gif        /// 描述:查询包下特定供应商的特定要求的应答内容
180InBlock.gif        /// 作者:南守拥
181InBlock.gif        /// 时间:2006年12月26日
182InBlock.gif        /// </summary>
183InBlock.gif        /// <param name="packid">包ID</param>
184InBlock.gif        /// <param name="provid">供应商ID</param>
185InBlock.gif        /// <param name="demandid">要求ID</param>
186ExpandedSubBlockEnd.gif        /// <returns></returns>

187InBlock.gif        private string GetResponseInfo(string packid,string provid,string demandid)
188ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
189InBlock.gif            SqlConnection con = new SqlConnection("Persist Security Info=false;Data Source=192.168.0.9;Initial Catalog=TjgpE;User ID=sa;Password=;");
190InBlock.gif            SqlDataAdapter da = new SqlDataAdapter("select distinct ResponseContent from V_StockItem_StockPack_Demand_BidValue_Resp where FK_StockPackID='"+packid+"'and FK_ResponseID='0'and Txt_ProvID='"+provid+"'and FK_DemandInfoID='"+demandid+"'",con);
191InBlock.gif            DataTable dt = new DataTable();
192InBlock.gif            da.Fill(dt);
193InBlock.gif            return dt.Rows[0][0].ToString();
194ExpandedSubBlockEnd.gif        }

195InBlock.gif
196InBlock.gif
197ContractedSubBlock.gifExpandedSubBlockStart.gif        Web 窗体设计器生成的代码#region Web 窗体设计器生成的代码
198InBlock.gif        override protected void OnInit(EventArgs e)
199ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
200InBlock.gif            //
201InBlock.gif            // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
202InBlock.gif            //
203InBlock.gif            InitializeComponent();
204InBlock.gif            base.OnInit(e);
205ExpandedSubBlockEnd.gif        }

206InBlock.gif        
207ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
208InBlock.gif        /// 设计器支持所需的方法 - 不要使用代码编辑器修改
209InBlock.gif        /// 此方法的内容。
210ExpandedSubBlockEnd.gif        /// </summary>

211InBlock.gif        private void InitializeComponent()
212ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{    
213InBlock.gif            this.grdTextAnserScore.ItemCreated += new System.Web.UI.WebControls.DataGridItemEventHandler(this.grdTextAnserScore_ItemCreated);
214InBlock.gif            this.grdTextAnserScore.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.grdTextAnserScore_ItemDataBound);
215InBlock.gif            this.Button1.Click += new System.EventHandler(this.Button1_Click);
216InBlock.gif            this.Load += new System.EventHandler(this.Page_Load);
217InBlock.gif
218ExpandedSubBlockEnd.gif        }

219ExpandedSubBlockEnd.gif        #endregion

220InBlock.gif
221InBlock.gif        private void grdTextAnserScore_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
222ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
223InBlock.gif            if(e.Item.ItemType == ListItemType.Header)
224ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
225InBlock.gif                e.Item.SetRenderMethodDelegate(new RenderMethod(NewRenderMothodItem));//输出流重定向(按项目)
226ExpandedSubBlockEnd.gif            }

227ExpandedSubBlockEnd.gif        }

228ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
229InBlock.gif        /// 描述:自定义表头输出
230InBlock.gif        /// 作者:南守拥
231InBlock.gif        /// 时间:2006年12月27日
232InBlock.gif        /// </summary>
233InBlock.gif        /// <param name="writer"></param>
234ExpandedSubBlockEnd.gif        /// <param name="ctl"></param>

235InBlock.gif        private void NewRenderMothodItem(HtmlTextWriter writer,Control ctl)
236ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
237InBlock.gif            //输出供应商ID
238InBlock.gif            writer.AddAttribute(HtmlTextWriterAttribute.Rowspan,"2");
239InBlock.gif            writer.AddAttribute(HtmlTextWriterAttribute.Class,"locked");
240InBlock.gif            writer.AddAttribute(HtmlTextWriterAttribute.Wrap,"false");
241InBlock.gif                writer.RenderBeginTag(HtmlTextWriterTag.Th);
242InBlock.gif                Label lbl0 = new Label();
243InBlock.gif                lbl0.Text = "供应商ID";
244InBlock.gif                lbl0.RenderControl(writer);
245InBlock.gif                writer.RenderEndTag();
246InBlock.gif            //输出供应商名称
247InBlock.gif            writer.AddAttribute(HtmlTextWriterAttribute.Rowspan,"2");
248InBlock.gif            writer.AddAttribute(HtmlTextWriterAttribute.Class,"locked");
249InBlock.gif            writer.AddAttribute(HtmlTextWriterAttribute.Wrap,"false");
250InBlock.gif                writer.RenderBeginTag(HtmlTextWriterTag.Th);
251InBlock.gif                Label lbl1 = new Label();
252InBlock.gif                lbl1.Text = "供应商名称";
253InBlock.gif                lbl1.RenderControl(writer);
254InBlock.gif                writer.RenderEndTag();
255InBlock.gif            //输出表头的第一行(分类名称部分)
256InBlock.gif            DataSet demand = getData();
257InBlock.gif            RenderTitleFirstRow(writer,demand);//输出第一行
258InBlock.gif            //强制结束换行
259InBlock.gif            writer.Write("</tr>");
260InBlock.gif            //输出表头的第二行(要求名称部分)
261InBlock.gif            RenderTitleSecondRow(writer,demand);//输出第二行 
262ExpandedSubBlockEnd.gif        }

263ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
264InBlock.gif        /// 描述:输出表头的第一行
265InBlock.gif        /// 作者:南守拥
266InBlock.gif        /// 时间:2006年12月27日
267InBlock.gif        /// </summary>
268ExpandedSubBlockEnd.gif        /// <param name="demand">分类其要求</param>

269InBlock.gif        private void RenderTitleFirstRow(HtmlTextWriter writer, DataSet demand)
270ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
271InBlock.gif            foreach(DataRow rowKind in demand.Tables["Kind"].Rows)   //循环所有的分类
272ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
273InBlock.gif                int colspan = GetCagegoryColspan(rowKind);   //得到其Colspan属性值
274InBlock.gif                writer.AddAttribute(HtmlTextWriterAttribute.Colspan,colspan.ToString());//添加相应的Colspan属性 
275InBlock.gif                writer.RenderBeginTag(HtmlTextWriterTag.Th);//输出表头单元格标记<th>
276InBlock.gif                    Label lbl = new Label();
277InBlock.gif                    lbl.Text = rowKind["DemandKindName"].ToString();//分类名称
278InBlock.gif                    lbl.RenderControl(writer);//输出
279InBlock.gif                writer.RenderEndTag();//输出表头单元格结束标记</th>
280ExpandedSubBlockEnd.gif            }

281ExpandedSubBlockEnd.gif        }

282ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
283InBlock.gif        /// 描述:得到特定分类的Colspan
284InBlock.gif        /// 作者:南守拥
285InBlock.gif        /// 时间:2006年12月27日
286InBlock.gif        /// </summary>
287InBlock.gif        /// <param name="row">分类行</param>
288ExpandedSubBlockEnd.gif        /// <returns>特定分类的Colspan值</returns>

289InBlock.gif        private int GetCagegoryColspan(DataRow row)
290ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
291InBlock.gif           int demaindCount = 0;
292InBlock.gif            for(int i = 0;i< row.GetChildRows("KindAndInfo").Length;i++//循环要求个数
293ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
294InBlock.gif               demaindCount ++;
295ExpandedSubBlockEnd.gif            }

296InBlock.gif            if(demaindCount == 0)
297ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
298InBlock.gif                return 1;
299ExpandedSubBlockEnd.gif            }

300InBlock.gif            return demaindCount*2;//因为表头的第二行有固定的Colspan数2(应答内容列、打分列)
301ExpandedSubBlockEnd.gif        }

302ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
303InBlock.gif        /// 描述:输出表头的第二行
304InBlock.gif        /// 作者:南守拥
305InBlock.gif        /// 时间:2006年12月27日
306InBlock.gif        /// </summary>
307InBlock.gif        /// <param name="writer">Html流</param>
308ExpandedSubBlockEnd.gif        /// <param name="demand">分类和要求</param>

309InBlock.gif        private void RenderTitleSecondRow(HtmlTextWriter writer,DataSet demand)
310ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
311InBlock.gif            //添加行<tr>
312InBlock.gif            writer.RenderBeginTag(HtmlTextWriterTag.Tr);
313InBlock.gif            //输出表头第二行
314InBlock.gif            foreach(DataRow rowKind in demand.Tables["Kind"].Rows)//分类
315ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
316InBlock.gif                foreach(DataRow rowInfo in rowKind.GetChildRows("KindAndInfo"))//要求
317ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
318InBlock.gif                   writer.AddAttribute(HtmlTextWriterAttribute.Colspan,"2");//固定的跨二列(应答内容列、打分列)
319InBlock.gif                    writer.RenderBeginTag(HtmlTextWriterTag.Th);//表头单元格<th>
320InBlock.gif                        Label lbl = new Label();
321InBlock.gif                        lbl.Text = rowInfo["DemandName"].ToString();//名称
322InBlock.gif                        lbl.RenderControl(writer);
323InBlock.gif                    writer.RenderEndTag();//表头单元格结束</th>
324ExpandedSubBlockEnd.gif                }

325ExpandedSubBlockEnd.gif            }

326InBlock.gif            //结束添加的行</tr>
327InBlock.gif            writer.RenderEndTag();
328ExpandedSubBlockEnd.gif        }

329InBlock.gif
330InBlock.gif
331ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
332InBlock.gif        /// 描述:打分表的行数据绑定事件
333InBlock.gif        /// 作者:南守拥
334InBlock.gif        /// 时间:2006年12月27日
335InBlock.gif        /// </summary>
336InBlock.gif        /// <param name="sender"></param>
337ExpandedSubBlockEnd.gif        /// <param name="e"></param>

338InBlock.gif        private void grdTextAnserScore_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
339ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
340InBlock.gif            if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
341ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
342InBlock.gif                e.Item.Cells[0].CssClass = "locked";//让第一列固定
343InBlock.gif                e.Item.Cells[1].CssClass = "locked";//让第二列固定
344ExpandedSubBlockEnd.gif            }

345ExpandedSubBlockEnd.gif        }

346InBlock.gif
347InBlock.gif
348ExpandedSubBlockStart.gifContractedSubBlock.gif        /**//// <summary>
349InBlock.gif        /// 事件测试,读打分值
350InBlock.gif        /// </summary>
351InBlock.gif        /// <param name="sender"></param>
352ExpandedSubBlockEnd.gif        /// <param name="e"></param>

353InBlock.gif        private void Button1_Click(object sender, System.EventArgs e)
354ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
355InBlock.gif            foreach(DataGridItem item in grdTextAnserScore.Items)
356ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
357InBlock.gif                TextBox txt = (TextBox)item.FindControl("Point资信要求3");
358InBlock.gif                if(txt != null)
359ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
360InBlock.gif                    Response.Write(txt.Text.Trim());
361ExpandedSubBlockEnd.gif                }

362ExpandedSubBlockEnd.gif            }

363ExpandedSubBlockEnd.gif        }

364ExpandedSubBlockEnd.gif    }

365ExpandedBlockEnd.gif}
这里面还有许多需要重构的,没有时间做了,项目太紧。

转载于:https://www.cnblogs.com/nanshouyong326/archive/2006/12/27/605046.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值