Exemple #1
0
        public async Task <ActionResult> PayMethod()
        {
            Shopping.AmountShoping();

            Utils.SetSubTotal(Shopping.GetAmount());
            if (Utils.GetDiscountCode() != string.Empty)
            {
                Utils.SetDiscount(await _administrationMethods.ReturnDiscountValue(Utils.GetDiscountCode()));
            }
            return(View());
        }
Exemple #2
0
        public PayData()
        {
            var administrationMethods = new AdministrationMethods();

            var client = ClientUtils.GetClient();
            var type   = PayMethod.GetType();
            var total  = Shopping.GetAmount();

            Client    = $"{client.Name} {client.Surname}";
            Direction = client.Direction;
            Phone     = client.Phone;
            Total     = total;

            switch (type)
            {
            case 1:
                Type         = "Efectivo";
                TypeCard     = "No aplica";
                CardNumber   = "No aplica";
                CheckNumber  = "No aplica";
                CheckAccount = "No aplica";
                break;

            case 2:
                Type         = "Cheque";
                TypeCard     = administrationMethods.ReturnCardType(PayMethod.GetCardClient().Type).Result.Type;
                CardNumber   = PayMethod.GetCardClient().CardNumber;
                CheckNumber  = "No aplica";
                CheckAccount = "No aplica";
                break;

            case 3:
                Type         = "Cheque";
                TypeCard     = "No aplica";
                CardNumber   = "No aplica";
                CheckNumber  = PayMethod.GetCheckClient().Number;
                CheckAccount = PayMethod.GetCheckClient().Account.ToString();
                break;
            }
        }