AppointmentCell.m 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // AppointmentCell.m
  3. // jiaPei
  4. //
  5. // Created by apple on 16/5/4.
  6. // Copyright © 2016年 JCZ. All rights reserved.
  7. //
  8. #import "AppointmentCell.h"
  9. @implementation AppointmentCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. [_zkzhLabel setFont:Font16 TextColor:titleColor];
  13. [_sfzhLabel setFont:Font16 TextColor:titleColor];
  14. [_nameLabel setFont:Font16 TextColor:titleColor];
  15. [_kscsLabel setFont:Font16 TextColor:titleColor];
  16. [_kskmLabel setFont:Font16 TextColor:titleColor];
  17. [_ksccLabel setFont:Font16 TextColor:titleColor];
  18. [_ksrqLabel setFont:Font16 TextColor:titleColor];
  19. [_lshLabel setFont:Font16 TextColor:titleColor];
  20. _timeLabel = [[UILabel alloc] initWithFrame:_ksrqLabel.frame];
  21. [_timeLabel setFont:Font16 TextColor:titleColor];
  22. _timeLabel.x = kSize.width/2.0;
  23. _timeLabel.width = kSize.width/2.0;
  24. [self.contentView addSubview:_timeLabel];
  25. }
  26. -(void)setDataDic:(NSDictionary *)dataDic
  27. {
  28. _dataDic = dataDic;
  29. NSString *subject = @"";
  30. switch ([dataDic[@"KSKM"] integerValue]) {
  31. case 1:
  32. subject = @"科一";
  33. break;
  34. case 2:
  35. subject = @"科二";
  36. break;
  37. case 3:
  38. subject = @"科三";
  39. break;
  40. case 4:
  41. subject = @"科四";
  42. break;
  43. default:
  44. break;
  45. }
  46. //NSLog(@"%@",dataDic);
  47. _zkzhLabel.text = [NSString stringWithFormat:@"准考证号:%@",dataDic[@"ZKZMBH"]];
  48. _sfzhLabel.text = [NSString stringWithFormat:@"身份证号:%@",dataDic[@"SFZMHM"]];
  49. _nameLabel.text = [NSString stringWithFormat:@"姓 名:%@",dataDic[@"XM"]];
  50. _kscsLabel.text = [NSString stringWithFormat:@"考试次数:%@次",dataDic[@"KSCS"]];
  51. _kskmLabel.text = [NSString stringWithFormat:@"考试科目:%@",subject];
  52. _ksccLabel.text = [NSString stringWithFormat:@"考试场次:第%@场",dataDic[@"KSCC"]];
  53. _timeLabel.text = [NSString stringWithFormat:@"考试日期:%@",dataDic[@"KSRQ"]];
  54. _lshLabel.text = [NSString stringWithFormat:@"报考车型:%@",dataDic[@"KSCX"]];
  55. _ksrqLabel.text = @"";
  56. }
  57. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  58. [super setSelected:selected animated:animated];
  59. // Configure the view for the selected state
  60. }
  61. @end