Ejemplo n.º 1
0
 public static void MyClassInitialize(TestContext testContext)
 {
     kernel         = TestManager.ConfigureNInjectKernel();
     cardDao        = kernel.Get <ICardDao>();
     userProfileDao = kernel.Get <IUserProfileDao>();
     cardService    = kernel.Get <ICardService>();
     userService    = kernel.Get <IUserService>();
 }
Ejemplo n.º 2
0
 public Card ToCard(ICardDao dao, Employee employee)
 {
     Card card = (Id == Guid.Empty.ToString()) ? new Card() : dao.Get(Id);
     card.Number = Number;
     card.State = State;
     card.Employee = employee;
     return card;
 }
Ejemplo n.º 3
0
        public Card ToCard(ICardDao dao, Employee employee)
        {
            Card card = (Id == Guid.Empty.ToString()) ? new Card() : dao.Get(Id);

            card.Number   = Number;
            card.State    = State;
            card.Employee = employee;
            return(card);
        }
        protected void gvAllCards_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            GridViewRow row        = gvAllCards.Rows[e.NewSelectedIndex];
            long        cardId     = (long)Convert.ToInt32(row.Cells[3].Text);
            IIoCManager iocManager = (IIoCManager)HttpContext.Current.Application["managerIoC"];
            ICardDao    cardDao    = (ICardDao)iocManager.Resolve <ICardDao>();

            cardDao.Remove(cardId);
            Response.Redirect(Request.RawUrl.ToString());
        }
 public PaymentService(ICardDao cardDao, ICurrencyDao currencyDao, IPaymentRequestDao paymentRequestDao,
                       IMerchantDao merchantDao, IAcquiringBankService acquiringBankService,
                       IBankPaymentResponseDao bankPaymentResponseDao)
 {
     _cardDao                = cardDao;
     _currencyDao            = currencyDao;
     _paymentRequestDao      = paymentRequestDao;
     _merchantDao            = merchantDao;
     _acquiringBankService   = acquiringBankService;
     _bankPaymentResponseDao = bankPaymentResponseDao;
     _encryptionKey          = ConfigurationManager.AppSettings["EncryptionKey"];
 }
Ejemplo n.º 6
0
 public static void MyClassInitialize(TestContext testContext)
 {
     kernel         = TestManager.ConfigureNInjectKernel();
     categoryDao    = kernel.Get <ICategoryDao>();
     cardDao        = kernel.Get <ICardDao>();
     userDao        = kernel.Get <IUserProfileDao>();
     productDao     = kernel.Get <IProductDao>();
     orderDao       = kernel.Get <IOrderDao>();
     orderLineDao   = kernel.Get <IOrderLineDao>();
     orderService   = kernel.Get <IOrderService>();
     userService    = kernel.Get <IUserService>();
     cardService    = kernel.Get <ICardService>();
     productService = kernel.Get <IProductService>();
 }
 public CardService(ICardDao cardDao)
 {
     this._cardDao = cardDao;
 }