예제 #1
0
파일: RoomForm.cs 프로젝트: 001220/HuaAo
        //添加房间
        private void btnAddRoom_Click(object sender, EventArgs e)
        {
            RoomTypeModel room = new RoomTypeModel();

            room.RTID1 = -1;
            EditingRoomForm editing = new EditingRoomForm(room);

            editing.Show();
        }
예제 #2
0
파일: RoomForm.cs 프로젝트: 001220/HuaAo
        //修改房间
        private void btnUpdateRomm_Click(object sender, EventArgs e)
        {
            int             index    = Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value);
            string          name     = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[1].Value.ToString();
            int             minMoney = Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[2].Value);
            int             flag     = Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[3].Value);
            int             count    = Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[4].Value);
            RoomTypeModel   room     = new RoomTypeModel(index, name, minMoney, flag, count);
            EditingRoomForm editing  = new EditingRoomForm(room);

            editing.Show();
        }