| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- //
- // ScanDiscountViewController.m
- // HMLG Scan Order
- //
- // Created by Rui Zhang on 6/16/22.
- // Copyright © 2022 United Software Applications, Inc. All rights reserved.
- //
- #import "ScanDiscountViewController.h"
- @interface ScanDiscountViewController ()
- @end
- @implementation ScanDiscountViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- if(self.bulk)
- {
-
- }
- // Do any additional setup after loading the view.
- }
- -(void) updatebtn:(UIButton*)btn
- {
- self.btn3.backgroundColor = UIColor.clearColor;
- self.btn5.backgroundColor = UIColor.clearColor;
- self.btn8.backgroundColor = UIColor.clearColor;
- self.btn10.backgroundColor = UIColor.clearColor;
- self.btnnone.backgroundColor = UIColor.clearColor;
- btn.backgroundColor =UIColor.redColor;
-
- }
- - (IBAction)onCancel:(id)sender {
- [self dismissViewControllerAnimated:NO
- completion:^{
-
-
- }];
- }
- - (IBAction)onUpdate:(id)sender {
- [self dismissViewControllerAnimated:NO
- completion:^{
- if(self.onSetValue)
- self.onSetValue( self.price,self.discount);
-
- }];
- }
- - (IBAction)on3:(id)sender {
- self.discount = 3;
- [self updatebtn:sender];
- }
- - (IBAction)onnone:(id)sender {
- self.discount = 0;
- [self updatebtn:sender];
- }
- - (IBAction)on5:(id)sender {
- self.discount = 5;
- [self updatebtn:sender];
- }
- - (IBAction)on8:(id)sender {
- self.discount = 8;
- [self updatebtn:sender];
- }
- - (IBAction)on10:(id)sender {
- self.discount = 10;
- [self updatebtn:sender];
- }
- /*
- #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
|