Преглед на файлове

Apex mobile

增加 home 单元格点击
Ray Zhang преди 8 години
родител
ревизия
4c4e2cf828

BIN
Apex Mobile/Apex Mobile.xcodeproj/project.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 2
Apex Mobile/Apex Mobile.xcodeproj/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -74,7 +74,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/LoginViewController.m"
-            timestampString = "538713952.006256"
+            timestampString = "539053550.295666"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "53"
@@ -95,7 +95,7 @@
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "68"
             endingLineNumber = "68"
-            landmarkName = "-tableView:numberOfRowsInSection:"
+            landmarkName = "-didReceiveMemoryWarning"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 31 - 0
Apex Mobile/Apex Mobile/HomeViewController.m

@@ -9,6 +9,8 @@
 #import "HomeViewController.h"
 #import "ShipingStatusCell.h"
 #import "ShipSearchController.h"
+#import "ApexMobileDB.h"
+#import "DetailTabBarController.h"
 
 #define SHIP_CELL_IDENTIFIER @"ShippingStatusCell"
 
@@ -175,6 +177,35 @@
     return 110;
 }
 
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
+
+[params setObject:@"dumb" forKey:@"id"];
+NSString* h_field;
+//if(self.radioContainer.selected==true)
+//{
+//    [params setObject:@"1" forKey:@"criterion_type"];
+//    h_field = @"ctnr";
+//}
+//else
+{
+    [params setObject:@"0" forKey:@"criterion_type"];
+    h_field = @"h_bol";
+}
+    
+    NSDictionary *item = [self.shipArray objectAtIndex:indexPath.section];
+NSString * cargo_criterion = item[@"hbol"];
+if(cargo_criterion==nil)
+cargo_criterion=@"";
+[params setObject:cargo_criterion forKey:@"cargo_criterion"];
+
+
+[ApexMobileDB savehistory:h_field value:cargo_criterion];
+
+DetailTabBarController *detailViewController=[[DetailTabBarController alloc] init:@"Cargo Tracking" actions:[NSArray arrayWithObjects:@"Tracking",nil] params:params];
+[self.navigationController pushViewController:detailViewController animated:YES];
+    
+}
 //#pragma mark - SearchBar Delegate
 //
 //- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar {

+ 28 - 0
Apex Mobile/Apex Mobile/ShipSearchController.m

@@ -169,6 +169,34 @@
 
 - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
     [self loadData];
+    
+    
+    /*
+     NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
+     
+     [params setObject:@"dumb" forKey:@"id"];
+     NSString* h_field;
+     if(self.radioContainer.selected==true)
+     {
+     [params setObject:@"1" forKey:@"criterion_type"];
+     h_field = @"ctnr";
+     }
+     else
+     {
+     [params setObject:@"0" forKey:@"criterion_type"];
+     h_field = @"h_bol";
+     }
+     NSString * cargo_criterion = self.edit.text;
+     if(cargo_criterion==nil)
+     cargo_criterion=@"";
+     [params setObject:cargo_criterion forKey:@"cargo_criterion"];
+     
+     
+     [ApexMobileDB savehistory:h_field value:cargo_criterion];
+     
+     DetailTabBarController *detailViewController=[[DetailTabBarController alloc] init:@"Cargo Tracking" actions:[NSArray arrayWithObjects:@"Tracking",nil] params:params];
+     [self.navigationController pushViewController:detailViewController animated:YES];
+     */
 }
 
 - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {