public void pStartinPayment(string name, string surname, string email)
        {
            SqlConnection connect = new SqlConnection(SqlConnectionString.ConnectionString());

            connect.Open();
            SqlCommand selectcommand2 = connect.CreateCommand();

            selectcommand2.CommandText    = "[dbo].[pStartingFee]";
            selectcommand2.CommandType    = CommandType.StoredProcedure;
            selectcommand2.CommandTimeout = 3000;
            SqlParameter param  = new SqlParameter("name", name);
            SqlParameter param2 = new SqlParameter("surname", surname);
            SqlParameter param3 = new SqlParameter("email", email);

            param.Direction  = ParameterDirection.Input;
            param2.Direction = ParameterDirection.Input;
            param3.Direction = ParameterDirection.Input;

            selectcommand2.Parameters.Add(param);
            selectcommand2.Parameters.Add(param2);
            selectcommand2.Parameters.Add(param3);

            SqlDataReader read2 = selectcommand2.ExecuteReader();

            read2.Close();
            connect.Close();
        }
        public DataTable getDataFromBase()
        {
            DataTable dt = new DataTable();

            string query = "select * from marathonOffice.vListParticipantsInOfficeRegisterCondition ";

            SqlConnection connect = new SqlConnection(SqlConnectionString.ConnectionString());

            try
            {
                connect.Open();
                SqlCommand selectcommand2 = connect.CreateCommand();
                selectcommand2.CommandText = query;
                selectcommand2.CommandType = CommandType.Text;
                SqlDataAdapter adapter = new SqlDataAdapter(selectcommand2);
                adapter.Fill(dt);

                connect.Close();
                return(dt);
            }
            catch (Exception ex)
            {
                string err = ex.Message;
                return(null);
            }
        }
        public void pInitializationAllParticipnat()
        {
            SqlConnection connect = new SqlConnection(SqlConnectionString.ConnectionString());

            connect.Open();
            SqlCommand selectcommand2 = connect.CreateCommand();

            selectcommand2.CommandText    = "[dbo].[pInitilizationParticipant]";
            selectcommand2.CommandType    = CommandType.StoredProcedure;
            selectcommand2.CommandTimeout = 3000;
            SqlDataReader read2 = selectcommand2.ExecuteReader();

            read2.Close();
            connect.Close();
        }
        public void pCreateEmptyStartList()
        {
            SqlConnection connect = new SqlConnection(SqlConnectionString.ConnectionString());

            connect.Open();
            SqlCommand selectcommand2 = connect.CreateCommand();

            selectcommand2.CommandText    = "[dbo].[pCreateEmptyStartList]";
            selectcommand2.CommandType    = CommandType.StoredProcedure;
            selectcommand2.CommandTimeout = 3000;
            SqlDataReader read2 = selectcommand2.ExecuteReader();

            read2.Close();
            connect.Close();
        }
        public void pStartParticipantFromList(int list_id)
        {
            SqlConnection connect = new SqlConnection(SqlConnectionString.ConnectionString());

            connect.Open();
            SqlCommand selectcommand2 = connect.CreateCommand();

            selectcommand2.CommandText    = "[participant].[pStartParticipantFromList]";
            selectcommand2.CommandType    = CommandType.StoredProcedure;
            selectcommand2.CommandTimeout = 3000;
            SqlParameter param = new SqlParameter("list_id", list_id);

            param.Direction = ParameterDirection.Input;

            selectcommand2.Parameters.Add(param);

            SqlDataReader read2 = selectcommand2.ExecuteReader();

            read2.Close();
            connect.Close();
        }