private void dgvShowInfoType_MouseClick(object sender, MouseEventArgs e) { // if (dgvShowInfoType.SelectedRows.Count == 0) { MessageBox.Show("没有任何数据,请继续搜索!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } RoomType roomTypeM = new RoomType( Convert.ToInt32(dgvShowInfoType.SelectedRows[0].Cells["Type"].Value), dgvShowInfoType.SelectedRows[0].Cells["typename"].Value.ToString(), Convert.ToDouble(dgvShowInfoType.SelectedRows[0].Cells["typeprice"].Value.ToString()), dgvShowInfoType.SelectedRows[0].Cells["isaddbed"].Value.ToString().Trim(), Convert.ToDouble(dgvShowInfoType.SelectedRows[0].Cells["addbedprice"].Value.ToString()), dgvShowInfoType.SelectedRows[0].Cells["remark"].Value.ToString() ); frmRoomTypeDetail rootTypeDetailFrm = new frmRoomTypeDetail(roomTypeM); rootTypeDetailFrm.MdiParent = this.MdiParent; rootTypeDetailFrm.Show(); }
/// <summary> /// 添加类型 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsbtnAdd_Click(object sender, EventArgs e) { TypeID = 0; frmRoomTypeDetail rootTypeDetailFrm = new frmRoomTypeDetail(TypeID); rootTypeDetailFrm.MdiParent = this.MdiParent; rootTypeDetailFrm.Show(); }