12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- //
- // TeachLogCell.m
- // LNManager
- //
- // Created by EchoShacolee on 2017/4/12.
- // Copyright © 2017年 lee. All rights reserved.
- //
- #import "TeachLogCell.h"
- @implementation TeachLogCell
- - (void)awakeFromNib {
- [super awakeFromNib];
-
- }
- /*
- CLASSID = 1291492734225373;
- ENDTIME = "2017-04-21 08:48:01";
- MILE = 0;
- STARTTIME = "2017-04-21 08:23:45";
- STUNAME = "\U5b98\U4e3d\U73cd";
- STUNUM = 2101040744781282;
- SUBJECT = 2;
- TIME = 21;
- */
- -(void)setDataWithDic:(NSDictionary *)dic{
-
- _nameLabel.text = dic[@"STUNAME"];
-
- switch ([[NSString stringWithFormat:@"%@",dic[@"SUBJECT"]] integerValue]) {
- case 1:
- _subjectlabel.text = @"科目:科目一";
- break;
- case 2:
- _subjectlabel.text = @"科目:科目二";
- break;
- case 3:
- _subjectlabel.text = @"科目:科目三";
- break;
- case 4:
- _subjectlabel.text = @"科目:科目四";
- break;
-
- default:
- break;
- }
-
- _trainTimeLabel.text = [NSString stringWithFormat:@"训练时长:%@分钟",dic[@"TIME"]];
- _mileAgeLabel.text = [NSString stringWithFormat:@"训练里程:%@km",dic[@"MILE"]];
-
-
- if ([dic[@"ENDTIME"] length] > 11) {
- _dateLabel.text = [NSString stringWithFormat:@"训练时段:%@至%@",dic[@"STARTTIME"],[dic[@"ENDTIME"] substringFromIndex:11]];
- }else {
- _dateLabel.text = [NSString stringWithFormat:@"%@至%@",dic[@"STARTTIME"],dic[@"ENDTIME"]];
- }
-
-
- _classIdlabel.text = [NSString stringWithFormat:@"课程编码:%@",dic[@"CLASSID"]];
- _stuNumberLabel.text = [NSString stringWithFormat:@"学员全国编号:%@",dic[@"STUNUM"]];
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- @end
|