public override void SelectExecute() { this.tableName = "Train"; statement = string.Format("select StaffNo,date_format(StartDate,'%Y-%m-%d') as StartDate,date_format(EndDate,'%Y-%m-%d') as EndDate,Type from {0} where StaffNo={1}", tableName, App.No); DataTable table = service.QueryManipulation(statement, connection); this.Table = DataTableToObservableCollection.ToObservableCollection <TrainViewModel>(table); }
public override void SelectExecute() { this.tableName = "Attendance"; statement = string.Format("select StaffNo,date_format(Date,'%Y-%m-%d') as Date,time_format(CheckInTime,'%H:%i:%s') as CheckInTime,time_format(LeaveTime,'%H:%i:%s') as LeaveTime,{0}.Status from {0} where StaffNo={1}", tableName, App.No); DataTable table = service.QueryManipulation(statement, connection); this.Table = DataTableToObservableCollection.ToObservableCollection <AttendanceViewModel>(table); }