50 lines
1.1 KiB
C#
50 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using Plattform.DB;
|
|
using Plattform.Models;
|
|
|
|
|
|
namespace Plattform
|
|
{
|
|
public partial class FormHotel : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void TextBoxHotelName_TextChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void TextBoxZipCode_TextChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void TextBoxCityName_TextChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void ButtonAddHotel_Click(object sender, EventArgs e)
|
|
{
|
|
HotelDB hotelDB = new HotelDB();
|
|
Hotel hotel = new Hotel
|
|
{
|
|
Name = TextBoxHotelName.Text,
|
|
City = new City
|
|
{
|
|
ZipCode = int.Parse(TextBoxZipCode.Text),
|
|
Name = TextBoxCityName.Text
|
|
}
|
|
};
|
|
hotelDB.CreateHotel(hotel);
|
|
}
|
|
}
|
|
} |