using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using C1.Silverlight;
using EsriMapSamples.ViewModel;

namespace EsriMapSamples
{
    public partial class AddUser : UserControl
    {
        public AddUser()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            User u = (User)this.DataContext;
            //u.DateAdded = DateTime.Now;

            C1Window parent = (C1Window)this.Parent;
            parent.Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            ((C1Window)this.Parent).Close();
        }

        private void TextBlock_Loaded(object sender, RoutedEventArgs e)
        {
            txtFirstName.Focus();
        }
    }
}
