public string GetUserEmail(Guid sessionId) { string userEmail = ""; using (var connection = ConnectionFactory.GetConnection()) { var sessionLogger = new ResellerClub.DataAccess.SessionLogger(connection); userEmail = sessionLogger.GetUserEmail(sessionId); } return(userEmail); }
public void ProcessOrder(Guid orderId) { List <IOrderItemMessage> orderItem; Guid sessionId; string userEmail; using (var connection = ConnectionFactory.GetConnection()) { var order = new ResellerClub.DataAccess.Order(connection); orderItem = order.GetUnProcessedOrderItem(orderId); sessionId = order.GetSessionId(orderId); var session = new ResellerClub.DataAccess.SessionLogger(connection); userEmail = session.GetUserEmail(sessionId); } Customer customer = new Customer(); customer.GetCustomerDetailByUserName(userEmail); customer.GetCustomerContactInfo(customer.CusInfo.CustomerID); Register(orderId, orderItem, customer.CusInfo); UpdateOrderStatus(orderId); }