Ejemplo n.º 1
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (dgvList.CurrentRow == null)
     {
         SOAFramework.Client.Controls.MessageBox.Show(this, "请选择一条数据");
         return;
     }
     EditHouse form = new EditHouse();
     form.Token = this.Token;
     form.Buildings = _buildings;
     form.House = dgvList.CurrentRow.DataBoundItem as FullHouse;
     form.Update_Callback += Form_Update_Callback; ;
     form.ShowDialog(this);
 }
Ejemplo n.º 2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (dgvHouse.SelectedRows.Count == 0)
     {
         SOAFramework.Client.Controls.MessageBox.Show(this, "请先选择房间");
         return;
     }
     var building = _selectedNode.Tag as FullBuilding;
     EditHouse form = new EditHouse();
     form.Token = this.Token;
     form.Buildings = _buildings;
     var currentHouse = dgvHouse.SelectedRows[0].DataBoundItem as FullHouse;
     form.House = currentHouse;
     form.BuildingID = building.ID;
     form.Floor = _currentFloor;
     form.Update_Callback += EditHouse_Callback;
     form.ShowDialog(this);
     //tabFloor_SelectedIndexChanged(null, null);
 }