Exemplo n.º 1
0
            public WWTTourForGUID(string TourGUID)
            {
                strErrorMsg = "";
                SqlConnection myConnection5 = Database.GetConnectionWWTTours();

                Tour cacheTour;
                int  GuidFoundPtr = -1;

                try
                {
                    int x = UpdateCache();

                    List <Tour> whatiscache = GetCache();

                    List <Tour> SelectedTours = new List <Tour>();

                    // loop thru cache - find the GUID
                    for (int c = 0; c < whatiscache.Count; c++)
                    {
                        cacheTour = new Tour();
                        cacheTour = (Tour)whatiscache[c];
                        string myGuidStr = cacheTour.TourGuid.ToString();
                        if (myGuidStr == TourGUID)
                        {
                            GuidFoundPtr = c;
                            SelectedTours.Add(cacheTour);
                        }
                    }
                    if (GuidFoundPtr > -1)
                    {
                        ds2 = SelectedTours;
                    }
                    else
                    {
                        myConnection5.Open();
                        SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetWWTToursForGUID", myConnection5);

                        Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure;

                        SqlParameter CustParm = new SqlParameter("@pWWTTourGUID", SqlDbType.VarChar);
                        CustParm.Value = TourGUID;
                        Cmd2.SelectCommand.Parameters.Add(CustParm);

                        ds = new WWTToursDataset();

                        Cmd2.Fill(ds, ds.Tables[0].TableName);
                    }

                    //cacheTour = new Tour();
                    //cacheTour = (Tour)whatiscache[0];
                    //string myName = cacheTour.AuthorName;
                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("WWTTourForGUID", "http://WWTWebServices", ex.Message, "2000", "WWTTourForGUID", WWTWebService.FaultCode.Client);
                }
                finally
                {
                    if (myConnection5.State == ConnectionState.Open)
                    {
                        myConnection5.Close();
                    }
                }
            }
Exemplo n.º 2
0
            public WWTTourForKeyword(string Keyword)
            {
                Tour cacheTour;
                int  TourFoundPtr = -1;

                int x = UpdateCache();

                List <Tour> whatiscache = GetCache();

                List <Tour> SelectedTours = new List <Tour>();

                // loop thru cache - find the matching keywords
                for (int c = 0; c < whatiscache.Count; c++)
                {
                    cacheTour = new Tour();
                    cacheTour = (Tour)whatiscache[c];
                    string myKeywords     = cacheTour.TourKeywordList;
                    char[] delimiterChars = { ' ' };
                    if (myKeywords != null)
                    {
                        string[] singleWord = myKeywords.Split(delimiterChars);
                        foreach (string s in singleWord)
                        {
                            if (s == Keyword)
                            {
                                if (TourFoundPtr != c)
                                {
                                    TourFoundPtr = c;
                                    SelectedTours.Add(cacheTour);
                                }
                            }
                        }
                    }
                }
                if (TourFoundPtr > -1)
                {
                    ds2 = SelectedTours;
                }
                else
                {
                    strErrorMsg = "";
                    SqlConnection myConnection5 = Database.GetConnectionWWTTours();

                    try
                    {
                        myConnection5.Open();
                        SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetWWTToursForKeyword", myConnection5);

                        Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure;

                        SqlParameter CustParm = new SqlParameter("@pKeyword", SqlDbType.NVarChar);
                        CustParm.Value = Keyword;
                        Cmd2.SelectCommand.Parameters.Add(CustParm);

                        ds = new WWTToursDataset();

                        Cmd2.Fill(ds, ds.Tables[0].TableName);
                    }
                    catch (Exception ex)
                    {
                        throw
                            WWTWebService.RaiseException("GetToursForKeyword", "http://WWTWebServices", ex.Message, "2000", "GetToursForKeyword", WWTWebService.FaultCode.Client);
                    }
                    finally
                    {
                        if (myConnection5.State == ConnectionState.Open)
                        {
                            myConnection5.Close();
                        }
                    }
                }
            }
Exemplo n.º 3
0
            public WWTTourForDateRange(string BeginDateTime, string EndDateTime)
            {
                Tour cacheTour;
                int  TourFoundPtr = -1;

                int x = UpdateCache();

                List <Tour> whatiscache = GetCache();

                List <Tour> SelectedTours = new List <Tour>();

                DateTime dtBeginDateTime;
                DateTime dtEndDateTime;

                try
                {
                    dtBeginDateTime = Convert.ToDateTime(BeginDateTime);
                }
                catch
                {
                    dtBeginDateTime = Convert.ToDateTime("1/1/1900");
                }

                try
                {
                    dtEndDateTime = Convert.ToDateTime(EndDateTime);
                }
                catch
                {
                    dtEndDateTime = Convert.ToDateTime("1/1/2100");
                }

                // loop thru cache - find the matching keywords
                for (int c = 0; c < whatiscache.Count; c++)
                {
                    cacheTour = new Tour();
                    cacheTour = (Tour)whatiscache[c];
                    DateTime myDateTime = cacheTour.TourSubmittedDateTime;
                    if (myDateTime >= dtBeginDateTime & myDateTime <= dtEndDateTime)  //(myGuidStr == TourGUID)
                    {
                        TourFoundPtr = c;
                        SelectedTours.Add(cacheTour);
                    }
                }
                if (TourFoundPtr > -1)
                {
                    ds2 = SelectedTours;
                }
                else
                {
                    strErrorMsg = "";

                    SqlConnection myConnection5 = Database.GetConnectionWWTTours();


                    try
                    {
                        myConnection5.Open();
                        SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetWWTToursForDateRange", myConnection5);

                        Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure;

                        SqlParameter CustParm = new SqlParameter("@pBeginDateTime", SqlDbType.DateTime);
                        CustParm.Value = dtBeginDateTime;
                        Cmd2.SelectCommand.Parameters.Add(CustParm);

                        SqlParameter CustParm2 = new SqlParameter("@pEndDateTime", SqlDbType.DateTime);
                        CustParm2.Value = dtEndDateTime;
                        Cmd2.SelectCommand.Parameters.Add(CustParm2);

                        ds = new WWTToursDataset();

                        Cmd2.Fill(ds, ds.Tables[0].TableName);
                    }
                    catch (Exception ex)
                    {
                        throw
                            WWTWebService.RaiseException("GetToursForDateRange", "http://WWTWebServices", ex.Message, "2000", "GetToursForDateRange", WWTWebService.FaultCode.Client);
                    }
                    finally
                    {
                        if (myConnection5.State == ConnectionState.Open)
                        {
                            myConnection5.Close();
                        }
                    }
                }
            }
Exemplo n.º 4
0
            public WWTTour(string TourXML, byte[] TourBlob, byte[] TourThumbnail, byte[] AuthorThumbnail)
            {
                strErrorMsg = "";
                SqlConnection myConnection5 = Database.GetConnectionWWTTours();


                // cut file stuff from here

                try
                {
                    //
                    SqlCommand Cmd5 = null;

                    Cmd5                = new SqlCommand();
                    Cmd5.Connection     = myConnection5;
                    Cmd5.CommandType    = CommandType.StoredProcedure;
                    Cmd5.CommandTimeout = 10000;

                    SqlParameter CustParm = Cmd5.CreateParameter();
                    CustParm.SqlDbType     = SqlDbType.NVarChar;
                    CustParm.ParameterName = "@pInputXMLStream";
                    Cmd5.Parameters.Add(CustParm);
                    CustParm.Value = TourXML;

                    Cmd5.CommandText = "spImportTour";
                    myConnection5.Open();

                    ds = new WWTToursDataset();
                    System.Data.SqlClient.SqlDataReader MySQLReader;

                    MySQLReader = Cmd5.ExecuteReader();


                    while (MySQLReader.Read())
                    {
                        int OrdTourGUID = MySQLReader.GetOrdinal("TourGUID");
                        outTourGuid       = MySQLReader.GetGuid(OrdTourGUID);
                        outTourGuidString = outTourGuid.ToString();

                        int OrdTourTitle = MySQLReader.GetOrdinal("TourTitle");
                        outTourTitle = MySQLReader.GetString(OrdTourTitle);
                    }


                    List <Tour> SelectedTours = new List <Tour>();

                    cacheTour                       = new Tour();
                    cacheTour.TourGuid              = outTourGuid;
                    cacheTour.TourTitle             = outTourTitle;
                    cacheTour.WorkFlowStatusCode    = "0";
                    cacheTour.TourSubmittedDateTime = System.DateTime.Now;

                    SelectedTours.Add(cacheTour);
                    ds2 = SelectedTours;
                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("ImportTour", "http://WWTWebServices", ex.Message, "2000", "ImportTour", WWTWebService.FaultCode.Client);
                }
                finally
                {
                    if (myConnection5.State == ConnectionState.Open)
                    {
                        myConnection5.Close();
                    }
                }

                try
                {
                    // Tour Thumbnail

                    string strTourUNC = GetToursUNC();
                    TourGUIDString = outTourGuidString;  // WAS :  GetTourGUIDFromXML(TourXML);
                    string NewFileName = "fail";

                    if (TourThumbnail.Length > 0)
                    {
                        NewFileName = strTourUNC + "\\" + TourGUIDString + "_TourThumb.bin";
                        Stream       t = new FileStream(NewFileName, FileMode.Create);
                        BinaryWriter b = new BinaryWriter(t);
                        b.Write(TourThumbnail);
                        t.Close();
                    }

                    // Tour Blob
                    if (TourBlob.Length > 0)
                    {
                        NewFileName = strTourUNC + "\\" + TourGUIDString + ".bin";
                        Stream       t2 = new FileStream(NewFileName, FileMode.Create);
                        BinaryWriter b2 = new BinaryWriter(t2);
                        b2.Write(TourBlob);
                        t2.Close();
                    }


                    // Author Thumbnail

                    if (AuthorThumbnail.Length > 0)
                    {
                        NewFileName = strTourUNC + "\\" + TourGUIDString + "_AuthorThumb.bin";
                        Stream       t3 = new FileStream(NewFileName, FileMode.Create);
                        BinaryWriter b3 = new BinaryWriter(t3);
                        b3.Write(AuthorThumbnail);
                        t3.Close();
                    }
                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("ImportTour", "http://WWTWebServices", ex.Message, "1000", "ImportTour", WWTWebService.FaultCode.Client);
                }
            }
Exemplo n.º 5
0
            public WWTTourUpdtStatus(string TourGUID, char WorkFlowStatusCode, string ApprovedRejectedByName)
            {
                strErrorMsg = "";
                SqlConnection myConnection5 = Database.GetConnectionWWTTours();

                try
                {
                    myConnection5.Open();
                    SqlDataAdapter Cmd2 = new SqlDataAdapter("spUpdateTourWorkFlowStatus", myConnection5);

                    Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure;

                    SqlParameter CustParm = new SqlParameter("@pWWTTourGUID", SqlDbType.VarChar);
                    CustParm.Value = TourGUID;
                    Cmd2.SelectCommand.Parameters.Add(CustParm);

                    SqlParameter CustParm2 = new SqlParameter("@pWorkFlowStatusCode", SqlDbType.Char);
                    CustParm2.Value = WorkFlowStatusCode;
                    Cmd2.SelectCommand.Parameters.Add(CustParm2);

                    SqlParameter CustParm3 = new SqlParameter("@pTourApprovedRejectedByName", SqlDbType.NVarChar);
                    CustParm3.Value = ApprovedRejectedByName;
                    Cmd2.SelectCommand.Parameters.Add(CustParm3);

                    ds = new WWTToursDataset();

                    Cmd2.Fill(ds, ds.Tables[0].TableName);

                    int x = UpdateCache();

                    List <Tour> whatiscache = GetCache();

                    List <Tour> SelectedTours = new List <Tour>();

                    // loop thru cache - find the GUID
                    for (int c = 0; c < whatiscache.Count; c++)
                    {
                        cacheTour = new Tour();
                        cacheTour = (Tour)whatiscache[c];
                        string myGuidStr = cacheTour.TourGuid.ToString();
                        if (myGuidStr == TourGUID)
                        {
                            GuidFoundPtr = c;
                            SelectedTours.Add(cacheTour);
                        }
                    }
                    if (GuidFoundPtr > -1)
                    {
                        ds2 = SelectedTours;
                    }
                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("UpdateTourWorkFlowStatus", "http://WWTWebServices", ex.Message, "2000", "UpdateTourWorkFlowStatus", WWTWebService.FaultCode.Client);
                }
                finally
                {
                    if (myConnection5.State == ConnectionState.Open)
                    {
                        myConnection5.Close();
                    }
                }
            }
Exemplo n.º 6
0
            public WWTTourForGUID(string TourGUID)
            {
                strErrorMsg = "";
                SqlConnection myConnection5 = Database.GetConnectionWWTTours();

                Tour cacheTour;
                int GuidFoundPtr = -1;

                try
                {
                    int x = UpdateCache();

                    List<Tour> whatiscache = GetCache();

                    List<Tour> SelectedTours = new List<Tour>();

                    // loop thru cache - find the GUID
                    for (int c = 0; c < whatiscache.Count; c++)
                    {
                        cacheTour = new Tour();
                        cacheTour = (Tour)whatiscache[c];
                        string myGuidStr = cacheTour.TourGuid.ToString();
                        if (myGuidStr == TourGUID)
                        {
                            GuidFoundPtr = c;
                            SelectedTours.Add(cacheTour);
                        }
                    }
                    if (GuidFoundPtr > -1)
                    {
                        ds2 = SelectedTours;
                    }
                    else
                    {
                        myConnection5.Open();
                        SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetWWTToursForGUID", myConnection5);

                        Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure;

                        SqlParameter CustParm = new SqlParameter("@pWWTTourGUID", SqlDbType.VarChar);
                        CustParm.Value = TourGUID;
                        Cmd2.SelectCommand.Parameters.Add(CustParm);

                        ds = new WWTToursDataset();

                        Cmd2.Fill(ds, ds.Tables[0].TableName);

                    }

                    //cacheTour = new Tour();
                    //cacheTour = (Tour)whatiscache[0];
                    //string myName = cacheTour.AuthorName;

                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("WWTTourForGUID", "http://WWTWebServices", ex.Message, "2000", "WWTTourForGUID", WWTWebService.FaultCode.Client);
                }
                finally
                {
                    if (myConnection5.State == ConnectionState.Open)
                        myConnection5.Close();
                }


            }
Exemplo n.º 7
0
            public WWTTourForDateRange(string BeginDateTime, string EndDateTime)
            {
                Tour cacheTour;
                int TourFoundPtr = -1;

                int x = UpdateCache();

                List<Tour> whatiscache = GetCache();

                List<Tour> SelectedTours = new List<Tour>();

                DateTime dtBeginDateTime;
                DateTime dtEndDateTime;

                try
                {
                    dtBeginDateTime = Convert.ToDateTime(BeginDateTime);
                }
                catch
                {
                    dtBeginDateTime = Convert.ToDateTime("1/1/1900");
                }

                try
                {
                    dtEndDateTime = Convert.ToDateTime(EndDateTime);
                }
                catch
                {
                    dtEndDateTime = Convert.ToDateTime("1/1/2100");
                }

                // loop thru cache - find the matching keywords
                for (int c = 0; c < whatiscache.Count; c++)
                {
                    cacheTour = new Tour();
                    cacheTour = (Tour)whatiscache[c];
                    DateTime myDateTime = cacheTour.TourSubmittedDateTime;
                    if (myDateTime >= dtBeginDateTime & myDateTime <= dtEndDateTime)  //(myGuidStr == TourGUID)
                    {
                        TourFoundPtr = c;
                        SelectedTours.Add(cacheTour);
                    }
                }
                if (TourFoundPtr > -1)
                {
                    ds2 = SelectedTours;
                }
                else
                {
                    strErrorMsg = "";

                    SqlConnection myConnection5 = Database.GetConnectionWWTTours();


                    try
                    {

                        myConnection5.Open();
                        SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetWWTToursForDateRange", myConnection5);

                        Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure;

                        SqlParameter CustParm = new SqlParameter("@pBeginDateTime", SqlDbType.DateTime);
                        CustParm.Value = dtBeginDateTime;
                        Cmd2.SelectCommand.Parameters.Add(CustParm);

                        SqlParameter CustParm2 = new SqlParameter("@pEndDateTime", SqlDbType.DateTime);
                        CustParm2.Value = dtEndDateTime;
                        Cmd2.SelectCommand.Parameters.Add(CustParm2);

                        ds = new WWTToursDataset();

                        Cmd2.Fill(ds, ds.Tables[0].TableName);
                    }
                    catch (Exception ex)
                    {
                        throw
                            WWTWebService.RaiseException("GetToursForDateRange", "http://WWTWebServices", ex.Message, "2000", "GetToursForDateRange", WWTWebService.FaultCode.Client);
                    }
                    finally
                    {
                        if (myConnection5.State == ConnectionState.Open)
                            myConnection5.Close();
                    }

                }

            }
Exemplo n.º 8
0
            public WWTTourForKeyword(string Keyword)
            {
                Tour cacheTour;
                int TourFoundPtr = -1;

                int x = UpdateCache();

                List<Tour> whatiscache = GetCache();

                List<Tour> SelectedTours = new List<Tour>();

                // loop thru cache - find the matching keywords
                for (int c = 0; c < whatiscache.Count; c++)
                {
                    cacheTour = new Tour();
                    cacheTour = (Tour)whatiscache[c];
                    string myKeywords = cacheTour.TourKeywordList;
                    char[] delimiterChars = { ' ' };
                    if (myKeywords != null)
                    {
                        string[] singleWord = myKeywords.Split(delimiterChars);
                        foreach (string s in singleWord)
                        {
                            if (s == Keyword)
                            {
                                if (TourFoundPtr != c)
                                {
                                    TourFoundPtr = c;
                                    SelectedTours.Add(cacheTour);
                                }
                            }
                        }
                    }
                }
                if (TourFoundPtr > -1)
                {
                    ds2 = SelectedTours;
                }
                else
                {

                strErrorMsg = "";
                SqlConnection myConnection5 = Database.GetConnectionWWTTours();

                try
                {

                    myConnection5.Open();
                    SqlDataAdapter Cmd2 = new SqlDataAdapter("spGetWWTToursForKeyword", myConnection5);

                    Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure;

                    SqlParameter CustParm = new SqlParameter("@pKeyword", SqlDbType.NVarChar);
                    CustParm.Value = Keyword;
                    Cmd2.SelectCommand.Parameters.Add(CustParm);

                    ds = new WWTToursDataset();

                    Cmd2.Fill(ds, ds.Tables[0].TableName);
                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("GetToursForKeyword", "http://WWTWebServices", ex.Message, "2000", "GetToursForKeyword", WWTWebService.FaultCode.Client);
                }
                finally
                {
                    if (myConnection5.State == ConnectionState.Open)
                        myConnection5.Close();
                }
            }


            }
Exemplo n.º 9
0
            public WWTTourUpdtStatus(string TourGUID, char WorkFlowStatusCode, string ApprovedRejectedByName)
            {
                strErrorMsg = "";
                SqlConnection myConnection5 = Database.GetConnectionWWTTours();

                try
                {

                    myConnection5.Open();
                    SqlDataAdapter Cmd2 = new SqlDataAdapter("spUpdateTourWorkFlowStatus", myConnection5);

                    Cmd2.SelectCommand.CommandType = CommandType.StoredProcedure;

                    SqlParameter CustParm = new SqlParameter("@pWWTTourGUID", SqlDbType.VarChar);
                    CustParm.Value = TourGUID;
                    Cmd2.SelectCommand.Parameters.Add(CustParm);

                    SqlParameter CustParm2 = new SqlParameter("@pWorkFlowStatusCode", SqlDbType.Char);
                    CustParm2.Value = WorkFlowStatusCode;
                    Cmd2.SelectCommand.Parameters.Add(CustParm2);

                    SqlParameter CustParm3 = new SqlParameter("@pTourApprovedRejectedByName", SqlDbType.NVarChar);
                    CustParm3.Value = ApprovedRejectedByName;
                    Cmd2.SelectCommand.Parameters.Add(CustParm3);

                    ds = new WWTToursDataset();

                    Cmd2.Fill(ds, ds.Tables[0].TableName);

                    int x = UpdateCache();

                    List<Tour> whatiscache = GetCache();

                    List<Tour> SelectedTours = new List<Tour>();

                    // loop thru cache - find the GUID
                    for (int c = 0; c < whatiscache.Count; c++)
                    {
                        cacheTour = new Tour();
                        cacheTour = (Tour)whatiscache[c];
                        string myGuidStr = cacheTour.TourGuid.ToString();
                        if (myGuidStr == TourGUID)
                        {
                            GuidFoundPtr = c;
                            SelectedTours.Add(cacheTour);
                        }
                    }
                    if (GuidFoundPtr > -1)
                    {
                        ds2 = SelectedTours;
                    }
                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("UpdateTourWorkFlowStatus", "http://WWTWebServices", ex.Message, "2000", "UpdateTourWorkFlowStatus", WWTWebService.FaultCode.Client);
                }
                finally
                {
                    if (myConnection5.State == ConnectionState.Open)
                        myConnection5.Close();
                }

            }
Exemplo n.º 10
0
            public WWTTour(string TourXML, byte[] TourBlob, byte[] TourThumbnail, byte[] AuthorThumbnail)
          {
                strErrorMsg = "";
                SqlConnection myConnection5 = Database.GetConnectionWWTTours();


                // cut file stuff from here

                try
                {
                    //
                    SqlCommand Cmd5 = null;

                    Cmd5 = new SqlCommand();
                    Cmd5.Connection = myConnection5;
                    Cmd5.CommandType = CommandType.StoredProcedure;
                    Cmd5.CommandTimeout = 10000;

                    SqlParameter CustParm = Cmd5.CreateParameter();
                    CustParm.SqlDbType = SqlDbType.NVarChar;
                    CustParm.ParameterName = "@pInputXMLStream";
                    Cmd5.Parameters.Add(CustParm);
                    CustParm.Value = TourXML;

                    Cmd5.CommandText = "spImportTour";
                    myConnection5.Open();

                    ds = new WWTToursDataset();
                    System.Data.SqlClient.SqlDataReader MySQLReader;

                    MySQLReader = Cmd5.ExecuteReader();


                    while (MySQLReader.Read())
                    {
                        int OrdTourGUID = MySQLReader.GetOrdinal("TourGUID");
                        outTourGuid = MySQLReader.GetGuid(OrdTourGUID);
                        outTourGuidString = outTourGuid.ToString();

                        int OrdTourTitle = MySQLReader.GetOrdinal("TourTitle");
                        outTourTitle = MySQLReader.GetString(OrdTourTitle);
                   }

                    
                    List<Tour> SelectedTours = new List<Tour>();

                        cacheTour = new Tour();
                        cacheTour.TourGuid = outTourGuid;
                        cacheTour.TourTitle = outTourTitle;
                        cacheTour.WorkFlowStatusCode = "0";
                        cacheTour.TourSubmittedDateTime = System.DateTime.Now;

                        SelectedTours.Add(cacheTour);
                        ds2 = SelectedTours;

                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("ImportTour", "http://WWTWebServices", ex.Message, "2000", "ImportTour", WWTWebService.FaultCode.Client);
                }
                finally
                {
                    if (myConnection5.State == ConnectionState.Open)
                        myConnection5.Close();
                }

                try
                {
                    // Tour Thumbnail

                    string strTourUNC = GetToursUNC();
                    TourGUIDString = outTourGuidString;  // WAS :  GetTourGUIDFromXML(TourXML);
                    string NewFileName = "fail";

                    if (TourThumbnail.Length > 0)
                    {
                        NewFileName = strTourUNC + "\\" + TourGUIDString + "_TourThumb.bin";
                        Stream t = new FileStream(NewFileName, FileMode.Create);
                        BinaryWriter b = new BinaryWriter(t);
                        b.Write(TourThumbnail);
                        t.Close();
                    }

                    // Tour Blob
                    if (TourBlob.Length > 0)
                    {
                        NewFileName = strTourUNC + "\\" + TourGUIDString + ".bin";
                        Stream t2 = new FileStream(NewFileName, FileMode.Create);
                        BinaryWriter b2 = new BinaryWriter(t2);
                        b2.Write(TourBlob);
                        t2.Close();
                    }


                    // Author Thumbnail

                    if (AuthorThumbnail.Length > 0)
                    {
                        NewFileName = strTourUNC + "\\" + TourGUIDString + "_AuthorThumb.bin";
                        Stream t3 = new FileStream(NewFileName, FileMode.Create);
                        BinaryWriter b3 = new BinaryWriter(t3);
                        b3.Write(AuthorThumbnail);
                        t3.Close();
                    }

                }
                catch (Exception ex)
                {
                    throw
                        WWTWebService.RaiseException("ImportTour", "http://WWTWebServices", ex.Message, "1000", "ImportTour", WWTWebService.FaultCode.Client);
                }

            }