Esempio n. 1
0
        /// <summary>
        /// Adding new record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ADDNewRecord(object sender, DirectEventArgs e)
        {
            ListRequest req = new ListRequest();
            ListResponse <SystemFolder> docs = _systemService.ChildGetAll <SystemFolder>(req);

            if (!docs.Success)
            {
                return;
            }
            List <object> options = new List <object>();

            foreach (var item in docs.Items)
            {
                options.Add(new { text = item.name, value = item.recordId });
            }
            X.Call("InitTypes", options);
            AttachmentsWindow.Show();
        }
Esempio n. 2
0
        public void InitalizeMenuButtons()
        {
            MenuButtonsList = new ObservableCollection <MenuButton>
            {
                new MenuButton((object x) =>
                {
                    ActualRequestsList = new ObservableCollection <RequestPanel>(GetRequestsList(new RequestsSearchFilter()).ToList());
                    //ActualRequestsList = new ObservableCollection<RequestPanel>(GetRequestsList(new RequestsSearchFilter()).ToList());

                    //foreach(var item in kek)
                    //	ActualRequestsList.Add(item);
                    middlePage.RequestsItemsControl.GetBindingExpression(ItemsControl.ItemsSourceProperty).UpdateTarget();                    //its working!!!
                    //ActualRequestsList[0].OnPropertyChanged("id");//its working!
                    //middlePage.RequestsItemsControl.GetBindingExpression(ContentControl.ContentProperty).UpdateTarget();
                    //UpdateMiddlePage();
                },
                               "Выданные задания", Directory.GetCurrentDirectory() + @"/Resourses/gear_icon.png"),
                new MenuButton((object x) =>
                {
                    requestCreationWindow = new RequestCreationWindow(this);
                    requestCreationWindow.ShowDialog();
                }, "Создать задание", Directory.GetCurrentDirectory() + @"/Resourses/strelka_right.png"),
                new MenuButton((object x) =>
                {
                    ActualRequestsList = new ObservableCollection <RequestPanel>(GetRequestsList(new RequestsSearchFilter()
                    {
                        Overdue = true
                    }).ToList());
                    middlePage.RequestsItemsControl.GetBindingExpression(ItemsControl.ItemsSourceProperty).UpdateTarget();                    //its working!!!
                }, "Просроченные", Directory.GetCurrentDirectory() + @"/Resourses/strelka_right.png"),
                new MenuButton((object x) => { new WorkingConfigurationWindow().ShowDialog(); }, "Параметры", Directory.GetCurrentDirectory() + @"/Resourses/strelka_right.png"),
                new MenuButton((object x) =>
                {
                    AttachmentsList   = new ObservableCollection <AttachmentIcon>(contract.GetAttachmentsList().ShortAttachmentList.Select(i => new AttachmentIcon(i, false)));
                    attachmentsWindow = new AttachmentsWindow()
                    {
                        DataContext = this
                    };
                    attachmentsWindow.Show();
                }, "Вложения в системе", Directory.GetCurrentDirectory() + @"/Resourses/iconFile.png")
            };
        }
Esempio n. 3
0
        /// <summary>
        /// Deleting all selected record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>


        /// <summary>
        /// Direct method for removing multiple records
        /// </summary>


        /// <summary>
        /// Adding new record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ADDNewRecord(object sender, DirectEventArgs e)
        {
            //Reset all values of the relative object
            //EditDocumentForm.Reset();
            //this.EditDocumentWindow.Title = Resources.Common.AddNewRecord;
            //FillDocumentTypes();

            //this.EditDocumentWindow.Show();

            List <SystemFolder> docs = GetFolders();

            List <object> options = new List <object>();

            foreach (var item in docs)
            {
                options.Add(new { text = item.name, value = item.recordId });
            }
            X.Call("InitTypes", options);
            AttachmentsWindow.Show();
        }