示例#1
0
        static void Main(string[] args)
        {
            var client = new AgeCalculatorServiceClient();
            Console.WriteLine("Mata in ditt födelsedatum. (YYYY-MM-DD)");
            var birthdate = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("Du är {0} dagar gammal.", client.CalculateAgedays(birthdate));
            Console.WriteLine("Du fyller jämt antal tusen dagar på datumet: {0}",client.CalculateEvenBirthday(birthdate) );
            Console.ReadKey();
        }
示例#2
0
        static void Main(string[] args)
        {
            var client = new AgeCalculatorServiceClient();

            Console.WriteLine("Mata in ditt födelsedatum. (YYYY-MM-DD)");
            var birthdate = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("Du är {0} dagar gammal.", client.CalculateAgedays(birthdate));
            Console.WriteLine("Du fyller jämt antal tusen dagar på datumet: {0}", client.CalculateEvenBirthday(birthdate));
            Console.ReadKey();
        }
示例#3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            var client = new AgeCalculatorServiceClient();

            var birthdate  = DateTime.Parse(TextBox1.Text);
            var daysOld    = client.CalculateAgedays(birthdate);
            var even1KDays = client.CalculateEvenBirthday(birthdate);

            Label1.Text   = daysOld.ToString();
            TextBox2.Text = even1KDays;
        }
示例#4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            var client = new AgeCalculatorServiceClient();
            
            var birthdate = DateTime.Parse(TextBox1.Text);
            var daysOld = client.CalculateAgedays(birthdate);
            var even1KDays = client.CalculateEvenBirthday(birthdate);

            Label1.Text = daysOld.ToString();
            TextBox2.Text = even1KDays;


        }