1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- //
- // StuExamListCell.m
- // LN_School
- //
- // Created by EchoShacolee on 2017/6/25.
- // Copyright © 2017年 Danson. All rights reserved.
- //
- #import "StuExamListCell.h"
- @implementation StuExamListCell
- +(instancetype)cellForTableView:(UITableView *)tableView{
-
- StuExamListCell * cell = [tableView dequeueReusableCellWithIdentifier:@"StuExamListCell"];
- if (!cell) {
- cell = [[[NSBundle mainBundle] loadNibNamed:@"StuExamListCell" owner:nil options:nil] lastObject];
- }
- return cell;
- }
- -(void)setDic:(NSDictionary *)dic{
-
- _dic = dic;
- _name.text = dic[@"EI_USERNAME"];
- _name.textColor = RQMianColor;
- NSString * sujectStr = [NSString stringWithFormat:@"%@",dic[@"EI_KSKM"]];
- NSString *str = @"";
- switch ([sujectStr integerValue]) {
- case 1:
- str = @"科目一";
- break;
- case 2:
- str = @"科目二";
- break;
- case 3:
- str = @"科目三";
- break;
- case 4:
- str = @"科目四";
- break;
- default:
- break;
- }
- _subject.text = [NSString stringWithFormat:@"%@",str];//考试科目:
- _score.text = [NSString stringWithFormat:@"%@分",dic[@"EI_SCORE"]];//分数:
- _start.text = [NSString stringWithFormat:@"开始时间:%@",dic[@"EI_STARTDATE"]];
- _end.text = [NSString stringWithFormat:@"结束时间:%@",dic[@"EI_ENDDATE"]];
- _sfzh.text = [NSString stringWithFormat:@"身份证号:%@",dic[@"EI_USERSFZHM"]];
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- @end
|