Exemple #1
0
        private void AcceptAttachment(object sender, RoutedEventArgs e)
        {
            if (dtFrom == null)
            {
                MessageBox.Show("Дата начала некорректна");
                return;
            }

            if (dtTo == null)
            {
                MessageBox.Show("Дата окончания некорректна");
                return;
            }


            requestWithAttachments.Request = new Request()
            {
                caption          = RequestCaption.Text,
                recourse         = RequestRecource.Text,
                Id               = 0,
                hasAttachments   = attachmentIcons.Count != 0,
                login_senderId   = menuHandle.contract.myLogin,
                login_recieverId = TargetOfRequest.Text,
                date_from        = dtFrom,
                date_to          = dtTo
            };


            if (menuHandle.AddRequest(requestWithAttachments))
            {
                MessageBox.Show("Задание добавлено");
                this.Close();
            }
        }