日期:2014-05-19  浏览次数:21834 次

在位置-1处没有任何行
for   (int   i   =   0;   i   <   ds.Tables[ "门诊shoufei "].Rows.Count;i++   )
                                        {
                                                if   (textBox1.Text   ==   ds.Tables[ "门诊shoufei "].Rows[i][ "编号 "].ToString())
                                                {
                                                        no   =   i;
                                                        break;
                                                }
                                        }
                                        textBox2.Text   =   ds.Tables[ "门诊shoufei "].Rows[no][ "姓名 "].ToString();
                                        textBox3.Text   =   ds.Tables[ "门诊shoufei "].Rows[no][ "性别 "].ToString();
                                        textBox4.Text   =   ds.Tables[ "门诊shoufei "].Rows[no][ "科室 "].ToString();
                                        textBox5.Text   =   ds.Tables[ "门诊shoufei "].Rows[no][ "年龄 "].ToString();
                                        textBox6.Text   =   ds.Tables[ "门诊shoufei "].Rows[no][ "应收费 "].ToString();
                                        textBox7.Text   =   ds.Tables[ "门诊shoufei "].Rows[no][ "项目1 "].ToString();
                                        textBox8.Text   =   ds.Tables[ "门诊shoufei "].Rows[no][ "项目2 "].ToString();
                                        textBox9.Text   =   ds.Tables[ "门诊shoufei "].Rows[no][ "项目3 "].ToString();