public static LogService getInstance() { if (logService == null) { logService = new LogService(); } return logService; }
public LogRecordForm() { InitializeComponent(); this.dateTimePicker_startTime.Format = DateTimePickerFormat.Custom; this.dateTimePicker_startTime.Text = DateTime.Now.ToString(); this.dateTimePicker_startTime_time.Text = DateTime.Now.ToString(); this.dateTimePicker_endTime.Format = DateTimePickerFormat.Custom; this.dateTimePicker_endTime.Text = DateTime.Now.ToString(); this.dateTimePicker_endTime_time.Text = DateTime.Now.ToString(); logService = LogService.getInstance(); pageUpControl_query.MyControl = gridControl_query; pageUpControl_query.QueryService = logService; }