StuExamListCell.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // StuExamListCell.m
  3. // LN_School
  4. //
  5. // Created by EchoShacolee on 2017/6/25.
  6. // Copyright © 2017年 Danson. All rights reserved.
  7. //
  8. #import "StuExamListCell.h"
  9. @implementation StuExamListCell
  10. +(instancetype)cellForTableView:(UITableView *)tableView{
  11. StuExamListCell * cell = [tableView dequeueReusableCellWithIdentifier:@"StuExamListCell"];
  12. if (!cell) {
  13. cell = [[[NSBundle mainBundle] loadNibNamed:@"StuExamListCell" owner:nil options:nil] lastObject];
  14. }
  15. return cell;
  16. }
  17. -(void)setDic:(NSDictionary *)dic{
  18. _dic = dic;
  19. _name.text = dic[@"EI_USERNAME"];
  20. _name.textColor = RQMianColor;
  21. NSString * sujectStr = [NSString stringWithFormat:@"%@",dic[@"EI_KSKM"]];
  22. NSString *str = @"";
  23. switch ([sujectStr integerValue]) {
  24. case 1:
  25. str = @"科目一";
  26. break;
  27. case 2:
  28. str = @"科目二";
  29. break;
  30. case 3:
  31. str = @"科目三";
  32. break;
  33. case 4:
  34. str = @"科目四";
  35. break;
  36. default:
  37. break;
  38. }
  39. _subject.text = [NSString stringWithFormat:@"%@",str];//考试科目:
  40. _score.text = [NSString stringWithFormat:@"%@分",dic[@"EI_SCORE"]];//分数:
  41. _start.text = [NSString stringWithFormat:@"开始时间:%@",dic[@"EI_STARTDATE"]];
  42. _end.text = [NSString stringWithFormat:@"结束时间:%@",dic[@"EI_ENDDATE"]];
  43. _sfzh.text = [NSString stringWithFormat:@"身份证号:%@",dic[@"EI_USERSFZHM"]];
  44. }
  45. - (void)awakeFromNib {
  46. [super awakeFromNib];
  47. // Initialization code
  48. }
  49. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  50. [super setSelected:selected animated:animated];
  51. // Configure the view for the selected state
  52. }
  53. @end