コード例 #1
0
ファイル: Model1.Designer.cs プロジェクト: DERESICL/Code
        /// <summary>
        /// Create a new Holidayhome object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="bookingID">Initial value of the BookingID property.</param>
        /// <param name="holidayhomeID">Initial value of the HolidayhomeID property.</param>
        public static Holidayhome CreateHolidayhome(global::System.Int32 id, global::System.Int32 bookingID, global::System.Int32 holidayhomeID)
        {
            Holidayhome holidayhome = new Holidayhome();

            holidayhome.Id            = id;
            holidayhome.BookingID     = bookingID;
            holidayhome.HolidayhomeID = holidayhomeID;
            return(holidayhome);
        }
コード例 #2
0
ファイル: CSVParser.cs プロジェクト: DERESICL/Code
        List<Models.Holidayhome> IDataParser.parseHolidayhomes()
        {
            CsvReader csv = new CsvReader(reader, true);
            int fieldCount = csv.FieldCount;
            List<Holidayhome> rates = new List<Holidayhome>();

            String[] headers = csv.GetFieldHeaders();

            while (csv.ReadNextRecord())
            {
                Holidayhome exObj = new Holidayhome();

                for (int i = 0; i < fieldCount; i++)
                {
                    if (headers[i].Equals("location"))
                    {
                        exObj.location = csv[i];
                    }
                    else if (headers[i].Equals("address1"))
                    {
                        exObj.address1 = csv[i];
                    }
                    else if (headers[i].Equals("address2"))
                    {
                        exObj.address2 = csv[i];
                    }
                    else if (headers[i].Equals("country"))
                    {
                        exObj.country = csv[i];
                    }
                    else if (headers[i].Equals("email"))
                    {
                        exObj.email = csv[i];
                    }
                    else if (headers[i].Equals("contactno"))
                    {
                        exObj.contactno = csv[i];
                    }
                    else if (headers[i].Equals("amenities"))
                    {
                        exObj.amenities = csv[i];
                    }

                }

                return location;
            }
        }
コード例 #3
0
ファイル: Model1.Designer.cs プロジェクト: DERESICL/Code
 /// <summary>
 /// Create a new Holidayhome object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="bookingID">Initial value of the BookingID property.</param>
 /// <param name="holidayhomeID">Initial value of the HolidayhomeID property.</param>
 public static Holidayhome CreateHolidayhome(global::System.Int32 id, global::System.Int32 bookingID, global::System.Int32 holidayhomeID)
 {
     Holidayhome holidayhome = new Holidayhome();
     holidayhome.Id = id;
     holidayhome.BookingID = bookingID;
     holidayhome.HolidayhomeID = holidayhomeID;
     return holidayhome;
 }