Пример #1
0
        private void BtnSaveClick(object sender, RoutedEventArgs e)
        {
            RepositoryClientInfo.Sync();
            if (ClientInfoControl.Validate())
            {
                if (_info == null)
                {
                    RepositoryClientInfo.Add(ClientInfoControl.GetClientInfo(_card, _info));
                }
                else
                {
                    RepositoryClientInfo.Update(ClientInfoControl.GetClientInfo(_card, _info));
                }

                RepositoryDiscountCard.Update(ClientInfoControl.GetDiscountCard(_card));

                Close();

                var messageWindow = new WMessage(Properties.Resources.BtnOk, Properties.Resources.LabelOperationComplete,
                                                 Properties.Resources.BtnOk);
                messageWindow.ShowDialog();
            }
        }