コード例 #1
0
        public static void Update()
        {
            Console.WriteLine("Id:");

            var id = Convert.ToInt32(Console.ReadLine());


            Console.WriteLine("Bank Id:");
            var bankid = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Card number:");
            var CardNum = Console.ReadLine();

            Console.WriteLine("Cvv:");
            var Cvv = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Extend Date(month/year):");
            var Date    = Console.ReadLine();
            var _mapper = SetupMapper();

            DalEF.Concrete.BankCardInfoDalEf dal = new BankCardInfoDalEf(_mapper);
            var Card = dal.GetBankCardInfoById(id);

            Card.BankID     = bankid;
            Card.CVV        = Cvv;
            Card.CardNumber = CardNum;
            Card.ExtendDate = Convert.ToDateTime(Date);
            dal.UpdateBankCardInfo(Card);
        }
コード例 #2
0
        public static void GetById()
        {
            Console.WriteLine("Id:");
            var id = Convert.ToInt32(Console.ReadLine());

            var _mapper = SetupMapper();

            DalEF.Concrete.BankCardInfoDalEf dal = new BankCardInfoDalEf(_mapper);
            var res = dal.GetBankCardInfoById(id);

            Console.WriteLine("BankCardInfoID \t" + "BankID \t" + "CardNumber \t" + " CVV \t" + "ExtendDate \t");
            Console.WriteLine("{0} \t {1} \t{2} \t{3} \t{4} \t", res.BankCardInfoID, res.BankID, res.CardNumber, res.CVV, res.ExtendDate);
        }