import { Component, OnInit } from '@angular/core';
import { AppComponent } from '../../../../..';
import { FrameRequest } from '../../../../../shared/frame/frame-request';

@Component({
  selector: 'app-turn-in-old-score',
  templateUrl: './turn-in-old-score.component.html',
  styleUrls: ['./turn-in-old-score.component.scss']
})
export class TurnInOldScoreComponent implements OnInit {

  public query = {
    in_ticket_no: "",
    std_name:""
  };


  TURN_IN_OLD_SCORE_URL = "by/byTurnInApply/searchTurninOld.htm";
  oldScore = [];

  constructor() { }

  ngOnInit() {
  }

  searchScoreOld() {
    
    FrameRequest.requestArray(this.TURN_IN_OLD_SCORE_URL, {
      in_ticket_no : this.query.in_ticket_no,
      std_name:this.query.std_name
    }, (array) => {
      this.oldScore = array;
    });
  }

  //重置
  reset() {
    this.query.in_ticket_no = "";
    this.oldScore = [];
  }

}
