Пример #1
0
 private BindingList <IAppointHistory> LoadData(EPVDatabase dbase, bool grouped,
                                                DateTime dateFrom, DateTime dateTo, string vehicleNum, int unitId, string cargo)
 {
     if (grouped)
     {
         return(AppointHistory.LoadList(dbase, 0, dateFrom, dateTo, vehicleNum, unitId, cargo));
     }
     else
     {
         return(AppointStateHistory.LoadList(dbase, 0, dateFrom, dateTo, vehicleNum, unitId, cargo));
     }
 }
        private void bwRefresh_DoWork(object sender, DoWorkEventArgs e)
        {
            LoadingParameters parameters = (LoadingParameters)e.Argument;

            LoadingResult result = new LoadingResult()
            {
                AppointHistory = AppointHistory.LoadList(parameters.Database, parameters.AppointId),
                AppointLog     = AppointLog.LoadList(parameters.Database, parameters.AppointId)
            };

            e.Result = result;
        }