| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- //
- // RetrievePassViewController.m
- // RedAnt ERP Mobile
- //
- // Created by Ray on 9/10/15.
- // Copyright (c) 2015 United Software Applications, Inc. All rights reserved.
- //
- #import "RetrievePassViewController.h"
- #import "RANetwork.h"
- @interface RetrievePassViewController ()
- @end
- @implementation RetrievePassViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
-
-
- // Dispose of any resources that can be recreated.
- }
- - (IBAction)onRetrieveClicked:(id)sender {
- NSString* user = self.editUser.text;
- NSString* email = self.editEmail.text;
-
- if(user.length==0||email.length==0)
- {
-
- [RAUtils message_box:@"Input Error!" message:@"User or email cannot be empty." completion:nil];
- return;
- }
-
-
-
- self.buttonRetrieve.enabled = false;
-
- [RANetwork request_retrieve_password:user email:email completionHandler:^(NSMutableDictionary *result) {
-
- NSDictionary* json=result;
- self.buttonRetrieve.enabled = true;
-
- if([[json valueForKey:@"result"] intValue]==2)
- {
-
- [RAUtils message_box:@"Successful!" message:@"Please Check email later." completion:nil];
-
-
- }
- else
- {
- [RAUtils message_box:@"Retrieve Password" message:[json valueForKey:@"err_msg"] completion:nil];
- }
-
- }];
-
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- @end
|