|
@@ -266,7 +266,7 @@ repeat:{
|
|
|
error:nil];
|
|
error:nil];
|
|
|
if(![url isEqualToString:URL_ERR_LOG])
|
|
if(![url isEqualToString:URL_ERR_LOG])
|
|
|
{
|
|
{
|
|
|
- [iSalesNetwork err_log:[RAUtils base64en:[RAUtils dict2string:params]] result:[RAUtils base64en:[RAUtils dict2string:ret]] module:url];
|
|
|
|
|
|
|
+ [iSalesNetwork err_log:[RAUtils base64en:[RAUtils dict2string:params]] result:[RAUtils base64en:[RAUtils dict2string:ret]] module:url code:RESULT_NET_ERROR];
|
|
|
}
|
|
}
|
|
|
return jsonData;
|
|
return jsonData;
|
|
|
|
|
|
|
@@ -321,9 +321,9 @@ repeat:{
|
|
|
[jsobj setValue:MSG_VER_LOW forKey:@"err_msg"];
|
|
[jsobj setValue:MSG_VER_LOW forKey:@"err_msg"];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(![url isEqualToString:URL_ERR_LOG]&&result!=2)
|
|
|
|
|
|
|
+ if(![url isEqualToString:URL_ERR_LOG]/*&&result!=-3*/&&result!=2)
|
|
|
{
|
|
{
|
|
|
- [iSalesNetwork err_log:[RAUtils base64en:[RAUtils dict2string:params]] result:[RAUtils base64en:str] module:url];
|
|
|
|
|
|
|
+ [iSalesNetwork err_log:[RAUtils base64en:[RAUtils dict2string:params]] result:[RAUtils base64en:str] module:url code:result];
|
|
|
}
|
|
}
|
|
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsobj
|
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsobj
|
|
|
options:0
|
|
options:0
|
|
@@ -1236,7 +1236,7 @@ repeat:{
|
|
|
NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
|
return jsobj;
|
|
return jsobj;
|
|
|
}
|
|
}
|
|
|
-+(NSDictionary*)err_log:(NSString*) up_params result:(NSString*)result module:(NSString*) module //device:(NSString*) device
|
|
|
|
|
|
|
++(NSDictionary*)err_log:(NSString*) up_params result:(NSString*)result module:(NSString*) module code:(int) code//device:(NSString*) device
|
|
|
{
|
|
{
|
|
|
if(![self IsNetworkAvailable])
|
|
if(![self IsNetworkAvailable])
|
|
|
return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
|
|
return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
|
|
@@ -1246,6 +1246,8 @@ repeat:{
|
|
|
[params setValue:appDelegate.user forKey:@"user"];
|
|
[params setValue:appDelegate.user forKey:@"user"];
|
|
|
|
|
|
|
|
[params setValue:up_params forKey:@"upparam"];
|
|
[params setValue:up_params forKey:@"upparam"];
|
|
|
|
|
+
|
|
|
|
|
+ [params setValue:[NSNumber numberWithInt:code ] forKey:@"code"];
|
|
|
|
|
|
|
|
[params setValue:result forKey:@"result"];
|
|
[params setValue:result forKey:@"result"];
|
|
|
[params setValue:module forKey:@"interfac"];
|
|
[params setValue:module forKey:@"interfac"];
|
|
@@ -1597,7 +1599,32 @@ repeat:{
|
|
|
NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
|
return jsobj;
|
|
return jsobj;
|
|
|
}
|
|
}
|
|
|
|
|
++(NSDictionary*) portfolio_setQTY:(NSString*) watchlist_id QTY:(int)qty
|
|
|
|
|
+{
|
|
|
|
|
+ if(![self IsNetworkAvailable])
|
|
|
|
|
+ return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
|
|
|
|
|
+ NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ if(appDelegate.user!=nil)
|
|
|
|
|
+ [params setValue:appDelegate.user forKey:@"user"];
|
|
|
|
|
+ if(appDelegate.contact_id!=nil)
|
|
|
|
|
+ [params setValue:appDelegate.contact_id forKey:@"contactId"];
|
|
|
|
|
+ if(appDelegate.password!=nil)
|
|
|
|
|
+ [params setValue:appDelegate.password forKey:@"password"];
|
|
|
|
|
+
|
|
|
|
|
+ [params setValue:watchlist_id forKey:@"item_id"];
|
|
|
|
|
+
|
|
|
|
|
+ [params setValue:[NSString stringWithFormat:@"%d",qty] forKey:@"available_qty"];
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ NSData* json=[self get_json:URL_DM_SET_QTY parameters:params];
|
|
|
|
|
+ if(json==nil)
|
|
|
|
|
+ return nil;
|
|
|
|
|
+ NSError *error=nil;
|
|
|
|
|
+ NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
|
|
|
+ return jsobj;
|
|
|
|
|
+}
|
|
|
+(NSDictionary*) portfolio_setPrice:(NSString*) watchlist_id price:(float) price discount:(float) discount
|
|
+(NSDictionary*) portfolio_setPrice:(NSString*) watchlist_id price:(float) price discount:(float) discount
|
|
|
{
|
|
{
|
|
|
if(![self IsNetworkAvailable])
|
|
if(![self IsNetworkAvailable])
|
|
@@ -2103,6 +2130,31 @@ repeat:{
|
|
|
// return jsobj;
|
|
// return jsobj;
|
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
++(NSDictionary*)request_model_qty: (NSString*) fashionId
|
|
|
|
|
+{
|
|
|
|
|
+ if(![self IsNetworkAvailable])
|
|
|
|
|
+ return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ if(appDelegate.user!=nil)
|
|
|
|
|
+ [params setValue:appDelegate.user forKey:@"user"];
|
|
|
|
|
+ if(appDelegate.contact_id!=nil)
|
|
|
|
|
+ [params setValue:appDelegate.contact_id forKey:@"contactId"];
|
|
|
|
|
+ if(appDelegate.password!=nil)
|
|
|
|
|
+ [params setValue:appDelegate.password forKey:@"password"];
|
|
|
|
|
+ [params setValue:fashionId forKey:@"fashionId"];
|
|
|
|
|
+
|
|
|
|
|
+ NSData* json=[self get_json:URL_REQUEST_MODEL_QTY parameters:params];
|
|
|
|
|
+ if(json==nil)
|
|
|
|
|
+ return nil;
|
|
|
|
|
+ NSError *error=nil;
|
|
|
|
|
+ NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
|
|
|
|
|
+ return jsobj;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
+(NSDictionary*)retrieve_password: (NSString*) user email:(NSString*) email
|
|
+(NSDictionary*)retrieve_password: (NSString*) user email:(NSString*) email
|
|
|
{
|
|
{
|
|
|
if(![self IsNetworkAvailable])
|
|
if(![self IsNetworkAvailable])
|
|
@@ -2216,6 +2268,7 @@ repeat:{
|
|
|
|
|
|
|
|
appDelegate.ipad_perm =nil ;
|
|
appDelegate.ipad_perm =nil ;
|
|
|
appDelegate.user_type = USER_ROLE_UNKNOWN;
|
|
appDelegate.user_type = USER_ROLE_UNKNOWN;
|
|
|
|
|
+ appDelegate.OrderFilter= nil;
|
|
|
[appDelegate SetSo:nil];
|
|
[appDelegate SetSo:nil];
|
|
|
[appDelegate set_main_button_panel];
|
|
[appDelegate set_main_button_panel];
|
|
|
}
|
|
}
|
|
@@ -2457,6 +2510,12 @@ repeat:{
|
|
|
|
|
|
|
|
appDelegate.ipad_perm =[objheader valueForKey:@"ipad_perm"] ;
|
|
appDelegate.ipad_perm =[objheader valueForKey:@"ipad_perm"] ;
|
|
|
|
|
|
|
|
|
|
+ NSString* strfilter = [objheader valueForKey:@"statusFilter"] ;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ appDelegate.OrderFilter= [[RAUtils string2dict:strfilter] mutableCopy];
|
|
|
|
|
+
|
|
|
|
|
|
|
|
[appDelegate set_main_button_panel];
|
|
[appDelegate set_main_button_panel];
|
|
|
|
|
|