///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //既往史手术清单表 operation_record//////////////////////////////////////////////////////////////////////////////////////// private void button3_Click(object sender, EventArgs e) { operation_record hm = new operation_record(); if (hm.ShowDialog() == DialogResult.OK) { DataRow drtmp = goodsList0.NewRow(); drtmp["id"] = 0; drtmp["resident_base_info_id"] = id; drtmp["operation_name"] = hm.operation_name.ToString(); drtmp["operation_time"] = hm.operation_time.ToString(); goodsList0.Rows.Add(drtmp); } goodsList0Bind(); }
//既往史手术清单表 operation_record private void button3_Click(object sender, EventArgs e) { if (goodsList0.Rows.Count >= 2) { MessageBox.Show("不能超过2条数据!"); return; } operation_record hm = new operation_record(); if (hm.ShowDialog() == DialogResult.OK) { DataRow drtmp = goodsList0.NewRow(); drtmp["id"] = 0; drtmp["resident_base_info_id"] = id; drtmp["operation_name"] = hm.operation_name.ToString(); drtmp["operation_time"] = hm.operation_time.ToString(); drtmp["operation_code"] = hm.operation_code.ToString(); goodsList0.Rows.Add(drtmp); } goodsList0Bind(); }