本帖最后由 dpf587 于 2012-05-24 13:45:13 编辑

解决方案 »

  1.   

    为何不用DataGridView列表控件显示呢?岂不是很好?
      

  2.   

    如果非要你那样的话,那就遍历窗体上面的控件,,foreach (Control c in this.Controls)
                {
                    if (c is TextBox)
                    {
                      string txt=((TextBox)c).text;
                    }
     if (c is Label)
                    {
                      string txt=((Label)c).text;
                    }
                }
      

  3.   

    酒店名称(label) 文本框(TextBox) 间数(label) 文本框(TextBox) 单价(label) 文本框(TextBox)说白了,你就是要把酒店名称,间数,单价写入数据库是吧,,通过文本框的Name属性写入数据啊,,
    string name=TxtjiudianName.Text;依次类推,,,,,