private void buttonResult_Click(object sender, EventArgs e) { var birth = new DateTime(int.Parse(textBoxYear.Text), int.Parse(textBoxMonth.Text), int.Parse(textBoxDay.Text)); var host = new Next1000DaysCalculatorClient(); labelResult.Text = host.CalculateNext1000Days(birth); }
static void Main(string[] args) { var host = new Next1000DaysCalculatorClient(); Console.WriteLine("Insert year"); var year = Console.ReadLine(); Console.WriteLine("Insert month"); var month = Console.ReadLine(); Console.WriteLine("Insert day"); var day = Console.ReadLine(); var birth = new DateTime(int.Parse(year), int.Parse(month), int.Parse(day)); Console.WriteLine(host.CalculateNext1000Days(birth)); Console.ReadLine(); }