C#-窗体之间传递参数

主窗体:

            string getroomtypeid = this.dgvroomtype.Rows[e.RowIndex].Cells[0].Value.ToString();
            AddRoomTypeFrm AddRoomTypeFrm = new AddRoomTypeFrm(getroomtypeid);
            AddRoomTypeFrm.Show();

子窗体

public AddRoomTypeFrm(string getroomtypeid)
{
        InitializeComponent();
        string id = getroomtypeid;
}

 

posted @ 2014-03-26 20:35  dekevin  阅读(221)  评论(0编辑  收藏  举报