// // AppointmentCell.m // jiaPei // // Created by apple on 16/5/4. // Copyright © 2016年 JCZ. All rights reserved. // #import "AppointmentCell.h" @implementation AppointmentCell - (void)awakeFromNib { [super awakeFromNib]; [_zkzhLabel setFont:Font16 TextColor:kTitleColor]; [_sfzhLabel setFont:Font16 TextColor:kTitleColor]; [_nameLabel setFont:Font16 TextColor:kTitleColor]; [_kscsLabel setFont:Font16 TextColor:kTitleColor]; [_kskmLabel setFont:Font16 TextColor:kTitleColor]; [_ksccLabel setFont:Font16 TextColor:kTitleColor]; [_ksrqLabel setFont:Font16 TextColor:kTitleColor]; [_lshLabel setFont:Font16 TextColor:kTitleColor]; _timeLabel = [[UILabel alloc] initWithFrame:_ksrqLabel.frame]; [_timeLabel setFont:Font16 TextColor:kTitleColor]; _timeLabel.x = kSize.width/2.0; _timeLabel.width = kSize.width/2.0; [self.contentView addSubview:_timeLabel]; } -(void)setDataDic:(NSDictionary *)dataDic { _dataDic = dataDic; NSString *subject = @""; switch ([dataDic[@"KSKM"] integerValue]) { case 1: subject = @"科一"; break; case 2: subject = @"科二"; break; case 3: subject = @"科三"; break; case 4: subject = @"科四"; break; default: break; } //NSLog(@"%@",dataDic); _zkzhLabel.text = [NSString stringWithFormat:@"准考证号:%@",dataDic[@"ZKZMBH"]]; _sfzhLabel.text = [NSString stringWithFormat:@"身份证号:%@",dataDic[@"SFZMHM"]]; _nameLabel.text = [NSString stringWithFormat:@"姓 名:%@",dataDic[@"XM"]]; _kscsLabel.text = [NSString stringWithFormat:@"考试次数:%@次",dataDic[@"KSCS"]]; _kskmLabel.text = [NSString stringWithFormat:@"考试科目:%@",subject]; _ksccLabel.text = [NSString stringWithFormat:@"考试场次:第%@场",dataDic[@"KSCC"]]; _timeLabel.text = [NSString stringWithFormat:@"考试日期:%@",dataDic[@"KSRQ"]]; _lshLabel.text = [NSString stringWithFormat:@"报考车型:%@",dataDic[@"KSCX"]]; _ksrqLabel.text = @""; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end