public List<AdminTransaction> AllMemberTransactionData()
        {
            List<AdminTransaction> AdminDataList = new List<AdminTransaction>();

            string conStr = ConfigurationManager.ConnectionStrings["ConnectToStopNShopDatabase"].ConnectionString;

            string queryString = null;
            queryString = "Select * from Transactions";
            try
            {
                using (SqlConnection connection = new SqlConnection(conStr))
                {
                    SqlCommand command = new SqlCommand(queryString, connection);
                    //command.Parameters.AddWithValue("userid", UserID);
                    connection.Open();
                    SqlDataReader reader = command.ExecuteReader();
                    while (reader.Read())
                    {
                        AdminTransaction AdminTrans = new AdminTransaction();
                        AdminTrans.TransactionID = Convert.ToInt32(reader[0]);
                        AdminTrans.UserID = Convert.ToInt32(reader[2]);
                        AdminTrans.ItemID = Convert.ToInt32(reader[4]);
                        AdminTrans.SeasonNO = Convert.ToString(reader[5]);
                        AdminTrans.Category = Convert.ToString(reader[3]);
                        AdminTrans.QuantityRequired = Convert.ToInt32(reader[6]);
                        AdminTrans.AccountNo = Convert.ToString(reader[8]);
                        AdminTrans.TotalAmount = Convert.ToInt32(reader[9]);
                        AdminTrans.TransactionDate = Convert.ToDateTime(reader[7]);
                        AdminTrans.Description = Convert.ToString(reader[1]);

                        AdminDataList.Add(AdminTrans);
                    }
                    reader.Close();
                }
            }
            catch (Exception) { }
            return AdminDataList;
        }
        public List<AdminTransaction> ViewTransaction(int UserIDList, string TransactionCategory, string ItemCategory)
        {
            List<AdminTransaction> TransactionList = new List<AdminTransaction>();

            string conStr = ConfigurationManager.ConnectionStrings["ConnectToStopNShopDatabase"].ConnectionString;

            string queryString = null;
            queryString = "Select * from Transactions where UserID=@userid and TransactionType=@transaction and ItemCategory=@itemcat";

            using (SqlConnection connection = new SqlConnection(conStr))
            {
                SqlCommand command = new SqlCommand(queryString, connection);
                command.Parameters.AddWithValue("userid", UserIDList);
                command.Parameters.AddWithValue("transaction", TransactionCategory);
                command.Parameters.AddWithValue("itemcat", ItemCategory);
                connection.Open();
                SqlDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    AdminTransaction transList = new AdminTransaction();

                    transList.TransactionID = Convert.ToInt32(reader[0]);
                    transList.UserID = Convert.ToInt32(reader[2]);
                    transList.ItemID = Convert.ToInt32(reader[4]);
                    transList.SeasonNO = Convert.ToString(reader[5]);
                    transList.Category = Convert.ToString(reader[3]);
                    transList.QuantityRequired = Convert.ToInt32(reader[6]);
                    transList.AccountNo = Convert.ToString(reader[8]);
                    transList.TotalAmount = Convert.ToInt32(reader[9]);
                    transList.TransactionDate = Convert.ToDateTime(reader[7]);
                    transList.Description = Convert.ToString(reader[1]);

                    TransactionList.Add(transList);
                }
                reader.Close();
            }
            return TransactionList;
        }