oop_II-6/Client/Client/ServiceClasses/Origin.cs

44 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Client
{
public class Origin
{
public string RestaurantName { get; set; }
public string Foodtype { get; set; }
public string Street { get; set; }
public int Plz { get; set; }
public string City { get; set; }
public Origin(string restName,
string foodtype,
string street,
int plz,
string city
)
{
RestaurantName = restName;
Foodtype = foodtype;
Street = street;
Plz = plz;
City = city;
}
public int CreateOrigin()
{
EHEC_Service.Origin myorigin = new EHEC_Service.Origin
{
Name = RestaurantName,
Food = Foodtype,
Street = Street,
City = City,
};
Global.GlobalInstance.Service.WriteOrigin(myorigin);
return myorigin.OriginId;
}
}
}