// 删除
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{
[[DataManage shareManage]open];
[[DataManage shareManage]deleteData:[self.PlainArray[indexPath.row]name]];
[self.PlainArray removeObject:self.PlainArray[indexPath.row]];
[self.ojtable reloadData];
}
// 点击单元格收藏数据持久化
-
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[[DataManage shareManage]open];
[[DataManage shareManage]create];
Student *model = self.PlainArray[indexPath.row];
[[DataManage shareManage]insert:model];
[[DataManage shareManage]close];
}
// 点击收藏按钮数据持久化 -
(void)BtnN:(UIButton *)btn{
int i = btn.tag;
[[DataManage shareManage]open];
[[DataManage shareManage]create];
Student *model = self.PlainArray[i];
[[DataManage shareManage]insert:model];
[[DataManage shareManage]close];
}