예제 #1
0
파일: BuildingList.cs 프로젝트: Alexcey/dd
 private void bt_addRoom_Click(object sender, EventArgs e)
 {
     if (selected_building != -1)
     {
         RoomEditor form = new RoomEditor(selected_building);
         form.ShowDialog();
         if (form.DialogResult == DialogResult.OK)
             loadRoom(selected_building);
     }
     else
     {
         MessageBox.Show(this, "Не выбран корпус.", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #2
0
파일: BuildingList.cs 프로젝트: Alexcey/dd
        private void bt_updateRoom_Click(object sender, EventArgs e)
        {
            if (selected_building != -1)
            {
                if (dg_room.SelectedRows.Count != 0)
                {
                    RoomEditor form = new RoomEditor(
                        int.Parse(dg_room.SelectedRows[0].Cells[0].Value.ToString()),
                        dg_room.SelectedRows[0].Cells[2].Value.ToString(),
                        dg_room.SelectedRows[0].Cells[3].Value.ToString(),
                        dg_room.SelectedRows[0].Cells[4].Value.ToString());
                    if (form.ShowDialog() == DialogResult.OK)
                        loadRoom(selected_building);
               /*     RoomEditor form = new RoomEditor(int.Parse(dg_room.SelectedRows[0].Cells[0].Value.ToString(),

                        )); */

                }
                else
                {
                    MessageBox.Show("Не выбрано ни одной комнаты.", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }