Esempio n. 1
0
        /// <summary>
        /// Открыть окно "Маршрут по применяемости"
        /// </summary>
        private void ShowSelectorWindow(object sender, RoutedEventArgs e)
        {
            if (grid.SelectedItems.Count != 1) return;

            this._edited_route = grid.SelectedItem as transfer;

            List<DictItem> newRoute = new List<DictItem>();
            SelectionRoute selectionRoute = new SelectionRoute(_dicts.Ss.Select(m => m.Name).ToList(), this._edited_route.route_changed ? this._edited_route.route : "");
            selectionRoute.Show();
            selectionRoute.Closed += new EventHandler(selectionRoute_Closed);
        }
Esempio n. 2
0
        public void ProcessKmhCard(transfer transfer)
        {
            string pageTitle = (string)HtmlPage.Document.GetProperty("title");
            pageTitle = pageTitle.Replace("%state%", transfer.isprikaz ? "приказной" : "стандартной");
            KmhInfo.Text = pageTitle;
            HtmlPage.Document.SetProperty("title", pageTitle);

            #region Setting enable permissions
            List<KeyValuePair<Guid, Control>> fieldControls = new List<KeyValuePair<Guid, Control>>();
            /*fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("8a61a7c5-c473-43fe-abae-3905ec6b138d"), ctrl_gotov_him));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("57fd91e0-f9fd-45b8-a5a0-68d61deb57ce"), ctrl_gotov_svar));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("9ea4f9b8-f95a-47b9-9dce-1f1eaf91e368"), ctrl_gotov_tech));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("9bcd8e56-990a-4e82-8ec8-e83992ca9d1f"), ctrl_gotov_kmh));*/
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("edf1d520-35ba-4523-b4ce-eaea7e29c500"), ctrl_material));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("fd9a15af-071d-495d-8ede-ef8c43818f85"), unitPVD));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("abb06e98-fa3f-43eb-92b3-c86b8111c7e8"), unitSF));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("367f8d6f-3e66-43bd-843a-d06be8517e1e"), unitUM));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("6f81de3e-52ee-404e-bee6-bf3f3c32086a"), unitRouteButton));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("f727b3af-3b15-4502-a30a-33f032f7d74c"), ctrl_no));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("833676bb-f38f-4162-a65d-a5c434ac954a"), ctrl_sw));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("e81ad870-6c8e-4a3e-9581-0909e1432dc7"), ctrl_stw));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("268b28e2-8844-431c-93eb-6fb407a31944"), ctrl_sd));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("13a97bce-2e03-4021-bca1-abb57eab2264"), ctrl_sp));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("8ca647b7-83ae-4f81-83fb-11f30c7b7529"), ctrl_ss));

            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("529cf0b5-e404-4b66-804a-aee36b0a1d4c"), btnAddKmhSaveStand));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("48c44ed9-bdd3-4305-87d6-1582614b014b"), btnAddKmhSaveOrder));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("529cf0b5-e404-4b66-804a-aee36b0a1d4c"), btnAddKmhSaveBoth));
            fieldControls.Add(new KeyValuePair<Guid, Control>(new Guid("48c44ed9-bdd3-4305-87d6-1582614b014b"), btnAddKmhSaveBoth));

            foreach (var pair in fieldControls)
            {
                if (!transfer.enabled_fields.Contains(pair.Key))
                {
                    pair.Value.IsEnabled = false;
                }
            }

            #endregion

            // ...

            _transfer = transfer;
            gridKmh.DataContext = _transfer;

            RequestAddMaterials(this, new RoutedEventArgs());
        }
Esempio n. 3
0
        private void RouteByApplicability(object sender, RoutedEventArgs e)
        {
            if (grid.SelectedItems.Count != 1) return;

            this._edited_route = grid.SelectedItem as transfer;

            Routes routesWin = new Routes(this._edited_route.prod_id, this._edited_route.prod_pn2);
            routesWin.Show();
            //routesWin.Closed += routesWin_Closed;
        }