private void InitForm() { frmHouseDetails fm = new frmHouseDetails(); houseId = fm.model.HouseID; label1.Text = fm.model.Building + "栋 " + fm.model.Unit + "单元 " + fm.model.RoomNumber + "室"; }
public static frmHouseDetails GetInstance(HouseEstateEntityTemp model) { if (frmHouseDtls == null) { frmHouseDtls = new frmHouseDetails(model); } return(frmHouseDtls); }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.Columns[e.ColumnIndex].Name == "Operate") { //可以在此打开新窗口,把参数传递过去 model.HouseEstateID = Convert.ToInt32(this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString()); model.HouseEstateName = this.dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString(); frmHouseDetails fm = frmHouseDetails.GetInstance(model); fm.Exec(model); fm.ShowDialog(); } }