Ejemplo n.º 1
0
 public override void AddItem(int sellerId, int productTypeId, short quantity, IDictionary <string, string> attributes)
 {
     base.AddItem(sellerId, productTypeId, quantity, attributes);
     responseCookies.SetJson(cartKeyWord, this,
                             new CookieOptions {
         Expires = DateTime.Now.AddMinutes(ExistingMinutes)
     });
 }
Ejemplo n.º 2
0
        public void LoginThrough(int id, bool rememberLogin = false)
        {
            SellerView seller = eCommerce.GetSellerBy(id);

            if (seller != null)
            {
                session.SetString(sellerSessionKeyWord, seller.Id);
                if (rememberLogin)
                {
                    responseCookies.SetJson(sellerCookieKeyWord,
                                            new LoginCookies
                    {
                        UserId     = id,
                        LoginValue = EncryptionService.Encrypt(seller.Email +
                                                               eCommerce.GetSellerEncryptedPassword(int.Parse(seller.Id)) +
                                                               connectionInfo.RemoteIpAddress.ToString())
                    },
                                            new CookieOptions {
                        Expires = DateTime.Now.AddMinutes(ExistingMinutes)
                    });
                }
            }
        }
Ejemplo n.º 3
0
        public void LoginThrough(int id, bool rememberLogin = false)
        {
            AdminView admin = eCommerce.GetAdminBy(id);

            if (admin != null)
            {
                session.SetString(adminSessionKeyWord, admin.Id);
                if (rememberLogin)
                {
                    responseCookies.SetJson(adminCookieKeyWord,
                                            new LoginCookies
                    {
                        UserId     = id,
                        LoginValue = EncryptionService.Encrypt(admin.Email +
                                                               eCommerce.GetAdminEncryptedPassword(id) +
                                                               connectionInfo.RemoteIpAddress.ToString())
                    },
                                            new CookieOptions {
                        Expires = DateTime.Now.AddMinutes(ExistingMinutes)
                    });
                }
            }
        }