Exemplo n.º 1
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (listView.SelectedItems.Count == 1)
     {
         EditTmperatureForm editor = new EditTmperatureForm(tool.BodyState.Teacher, int.Parse(this.PrimaryKey), (BodyTmperature)listView.SelectedItems[0].Tag);
         editor.ShowDialog();
     }
     else
     {
         MsgBox.Show("請選擇一筆資料");
     }
 }
        private void dataGridViewX1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex != -1 && e.ColumnIndex != -1)
            {
                //叫出資料進行修改
                if (dataGridViewX1.Rows[e.RowIndex].Tag != null)
                {
                    SuperStudent       stud = (SuperStudent)dataGridViewX1.Rows[e.RowIndex].Tag;
                    EditTmperatureForm erf  = new EditTmperatureForm(tool.BodyState.Student, int.Parse(stud.StudentID), stud.bt);
                    erf.ShowDialog();

                    //修正後
                    dataGridViewX1.Rows[e.RowIndex].Cells[3].Value = erf._BT.BodyTemperature;
                    dataGridViewX1.Rows[e.RowIndex].Cells[4].Value = "已手動修改";
                }
            }
        }
Exemplo n.º 3
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            EditTmperatureForm editor = new EditTmperatureForm(tool.BodyState.Teacher, int.Parse(this.PrimaryKey));

            editor.ShowDialog();
        }