-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainViewController.m
More file actions
81 lines (66 loc) · 1.69 KB
/
MainViewController.m
File metadata and controls
81 lines (66 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// MainViewController.m
// SampleUseFMDB
//
// Created by MacPro01 on 2013/11/21.
// Copyright (c) 2013年 eyoneya. All rights reserved.
//
#import "MainViewController.h"
#import "SqliteDB.h"
#import "EntTableA.h"
@interface MainViewController ()
@end
@implementation MainViewController
@synthesize tfKey;
@synthesize tfTData;
@synthesize tfIData;
@synthesize swBData;
@synthesize buttonSearch;
@synthesize buttonDelete;
@synthesize buttonRegistry;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/// 登録ボタン押下処理
- (IBAction)saveData:(id)sender {
}
/// 削除ボタン押下処理
- (IBAction)deleteData:(id)sender {
}
///検索ボタン押下処理
- (IBAction)searchData:(id)sender {
// 検索条件
NSInteger key = [tfKey.text integerValue];
if (key < 1){
NSLog(@"[key]を入力してください");
return;
}
EntTableA *ent = [EntTableA selectByKey:key];
if (ent != nil) {
tfTData.text = ent.textData;
tfIData.text = [NSString stringWithFormat:@"%d", ent.intData];
//tfBData.text = [NSString stringWithFormat:@"%d", ent.boolData];
}
}
/// スイッチ切り替え処理
- (IBAction)switchBData:(id)sender {
}
/// テキストボックス-フォーカスアウト時処理
- (IBAction)closeSoftwareKeyboard:(id)sender{
[sender resignFirstResponder];
}
@end