public void EndEdit() { if (m_Editing == true) { temp_Task = null; m_Editing = false; } }
// Implement IEditableObject interface. public void BeginEdit() { if (m_Editing == false) { temp_Task = this.MemberwiseClone() as Alarm_In; m_Editing = true; } }
private void InOut_Import() { for (int i = 2; i < 1000; i++) { if (ws2.Cells[i, 1].Value != null) { Alarm_In alarm_In = new Alarm_In(); alarm_In.mBoardNo = Convert.ToString(ws2.Cells[i, 1].Value); alarm_In.mCircuit = Convert.ToString(ws2.Cells[i, 2].Value); alarm_In.mCode = Convert.ToString(ws2.Cells[i, 3].Value); alarm_In.mMassage1 = Convert.ToString(ws2.Cells[i, 4].Value); alarm_In.mMassage2 = Convert.ToString(ws2.Cells[i, 5].Value); alarm_In.mMassage3 = Convert.ToString(ws2.Cells[i, 6].Value); alarm_In.mMassage4 = Convert.ToString(ws2.Cells[i, 7].Value); alarm_In.mControl1 = Convert.ToString(ws2.Cells[i, 8].Value); alarm_In.mControl2 = Convert.ToString(ws2.Cells[i, 9].Value); Global_Variable.oAlarmIn_Table.Add(alarm_In); } else { break; } } for (int i = 2; i < 1000; i++) { if (ws2.Cells[i, 11].Value != null) { Alarm_Out alarm_Out = new Alarm_Out(); alarm_Out.mBoardNo = Convert.ToString(ws2.Cells[i, 11].Value); alarm_Out.mCircuit = Convert.ToString(ws2.Cells[i, 12].Value); alarm_Out.mMassage1 = Convert.ToString(ws2.Cells[i, 13].Value); alarm_Out.mMassage2 = Convert.ToString(ws2.Cells[i, 14].Value); alarm_Out.mMassage3 = Convert.ToString(ws2.Cells[i, 15].Value); alarm_Out.mMassage4 = Convert.ToString(ws2.Cells[i, 16].Value); alarm_Out.mPushStop = Convert.ToString(ws2.Cells[i, 17].Value); Global_Variable.oAlarmOut_Table.Add(alarm_Out); } else { break; } } }