static public void SetConfig(TimerConfig tc, string sectionName) { SettingItem timerSetting = AppSettingHelper.GetSpecifySection(sectionName); timerSetting.BatchBegin(); try { timerSetting.WriteDateTime("LastTime1", tc.LastTime1); timerSetting.WriteDateTime("LastTime2", tc.LastTime2); timerSetting.WriteDateTime("LastTime3", tc.LastTime3); timerSetting.WriteDateTime("LastTime4", tc.LastTime4); timerSetting.WriteDateTime("LastTime5", tc.LastTime5); timerSetting.BatchCommit(); } catch (Exception ex) { timerSetting.BatchCancel(); MsgBox.ShowException(ex); } }