Esempio n. 1
0
        /***********************************************************/
        // "Stop" click
        /***********************************************************/
        private void btnStop_Click(object sender, RoutedEventArgs e)
        {
            var dt = DateTime.Now;

            ObservableCollection <TimeRegistration> list = (ObservableCollection <TimeRegistration>)dgTimeRegistrations.ItemsSource;

            var tr = list[0];

            if (tr.EndTime != "")
            {
                MessageBox.Show("You have not started a time registration");
                return;
            }

            var wsObj = WebserviceCalls.EndTimeRegistration(tr.TimeRegId, dt.ToString("yyyy-MM-dd'T'HH:mm:ss"));

            if (wsObj.Success)
            {
                GetTimeRegistrations();
            }
        }