Просмотр исходного кода

161020

show so# for customer login
show customer info for customer login
Ray Zhang 9 лет назад
Родитель
Сommit
0654605b7f

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 41 - 39
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -336,41 +336,43 @@
                     //                [main_vc.headerView setNeedsLayout];
                 }
                 
-                NSString * contact =[self.customerInfo valueForKey:@"customer_contact"];
-                NSString * customer=[self.customerInfo valueForKey:@"customer_name"];
-                if(self.customerInfo==nil)
+
+                
+            }
+            
+            NSString * contact =[self.customerInfo valueForKey:@"customer_contact"];
+            NSString * customer=[self.customerInfo valueForKey:@"customer_name"];
+            if(self.customerInfo==nil)
+            {
+                //                contact=@"No Name";    if(customerinfo==nil)
+                //                {
+                contact=@"Select Contact";
+                [main_vc.btnContact setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
+            }
+            else
+            {
+                
+                if(contact==nil||contact.length==0)
                 {
-                    //                contact=@"No Name";    if(customerinfo==nil)
-                    //                {
-                    contact=@"Select Contact";
+                    contact=@"No Name";
                     [main_vc.btnContact setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
                 }
                 else
                 {
-                    
-                    if(contact==nil||contact.length==0)
-                    {
-                        contact=@"No Name";
-                        [main_vc.btnContact setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-                    }
-                    else
-                    {
-                        [main_vc.btnContact setTitleColor:UIColorFromRGB(0x009900) forState:UIControlStateNormal];
-                    }
+                    [main_vc.btnContact setTitleColor:UIColorFromRGB(0x009900) forState:UIControlStateNormal];
                 }
-                
-                NSMutableArray* arr_contact = [[NSMutableArray alloc] init];
-                if(contact.length>0)
-                    [arr_contact addObject:contact];
-                if(customer.length>0)
-                    [arr_contact addObject:customer];
-                
-                NSString *contact_string = [arr_contact componentsJoinedByString:@" @"];
-                
-                
-                [main_vc.btnContact setTitle:contact_string forState:UIControlStateNormal];
-                
             }
+            
+            NSMutableArray* arr_contact = [[NSMutableArray alloc] init];
+            if(contact.length>0)
+                [arr_contact addObject:contact];
+            if(customer.length>0)
+                [arr_contact addObject:customer];
+            
+            NSString *contact_string = [arr_contact componentsJoinedByString:@" @"];
+            
+            
+            [main_vc.btnContact setTitle:contact_string forState:UIControlStateNormal];
         }
     });
 }
@@ -395,17 +397,17 @@
         }
         else
         {
-            if(self.user_type==USER_ROLE_CUSTOMER)
-            {
-                
-                
-                main_vc.labelSo.text=nil;
-                //            main_vc.buttonUser.hidden=true;
-                //            main_vc.buttonUser.hidden=false;
-                //             [main_vc.headerView setNeedsDisplay];
-                //            [main_vc.headerView setNeedsLayout];
-            }
-            else
+//            if(self.user_type==USER_ROLE_CUSTOMER)
+//            {
+//                
+//                
+//                main_vc.labelSo.text=nil;
+//                //            main_vc.buttonUser.hidden=true;
+//                //            main_vc.buttonUser.hidden=false;
+//                //             [main_vc.headerView setNeedsDisplay];
+//                //            [main_vc.headerView setNeedsLayout];
+//            }
+//            else
             {
                 if(So.length==0)
                     main_vc.labelSo.text=nil;