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) }); }
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) }); } } }
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) }); } } }