Beispiel #1
0
        /// <summary>Значения декларации</summary>
        private void DeclVal(Grid grid, Declaration decl)
        {
            grid.RowDefinitions.Clear();
            grid.ColumnDefinitions.Clear();
            grid.Children.Clear();
            grid.SetRowFromGrid(MyTools.GL_Auto);
            var wh = new MyTools.C_MinMaxWidthHeight(HorAlig: HorizontalAlignment.Left, Wrap: true, MinMaxName: 80, MinWidth: 80);

            grid.SetFromGrid(decl.GetEditor(SFE, wh, Column.Declaration));
            decl = Helpers.LogicHelper.DeclarationLogic.FirstModel(decl.ID);
            MyTools.C_SettingFromRowEdit _sfe = new MyTools.C_SettingFromRowEdit(MyTools.EPosition.Horisontal, ShowName: false, ScopeColumn: true);
            foreach (var val in decl.DeclarationValues.OrderBy(x => Helpers.LogicHelper.PollutionLogic.FirstModel(x.PollutionID).Number).ToArray())
            {
                grid.SetRowFromGrid();
                List <MyTools.C_DefColumn> columns = new List <MyTools.C_DefColumn>();
                columns.Add(new MyTools.C_DefColumn(C.DeclarationValue.Pollution, wh, val.PollutionID > 0 ? false : true, font: new MyTools.S_FontControl(20, Color: val.PollutionID > 0 ? Brushes.LightCoral : Brushes.LightGreen, SymbolReplace: true)));
                int round = T.Pollution.Rows.Get <int>(val.PollutionID, C.Pollution.Round);
                if (T.Pollution.Rows.Get <bool>(val.PollutionID, C.Pollution.HasRange))
                {
                    columns.Add(new MyTools.C_DefColumn(C.DeclarationValue.From, wh, true, round));
                }
                columns.Add(new MyTools.C_DefColumn(C.DeclarationValue.To, wh, true, round));
                grid.SetFromGrid(val.GetEditor(_sfe, columns.ToArray()));
            }
        }
Beispiel #2
0
 public Client_Class(TabControl TB, uint clientID)
 {
     this.ThisTC   = TB;
     this.clientID = clientID;
     WH            = new MyTools.C_MinMaxWidthHeight(MinWidth: 80, HorAlig: HorizontalAlignment.Left, Wrap: true, MinMaxName: 250);
     SFE           = new MyTools.C_SettingFromRowEdit(MyTools.EPosition.Vertical, true, -1, true, false, true);
     DrawClient();
     DrawObject();
 }
Beispiel #3
0
        public SampleAdd_Window(uint negotiationAssistantID)
        {
            InitializeComponent();

            negotiationAssistant = Helpers.LogicHelper.NegotiationAssistantLogic.FirstModel(negotiationAssistantID);

            if (negotiationAssistant.WorkerID == 0)
            {
                MessageBox.Show("Не выбран пробоотборщик!");
                this.Activated += (sender, e) => Close();
            }

            WH   = new MyTools.C_MinMaxWidthHeight(MinWidth: 80);
            font = new MyTools.S_FontControl(18);
            EditNegotiationAssistant.SetRowFromGrid(MyTools.GL_Auto);
            EditNegotiationAssistant.SetFromGrid(negotiationAssistant.GetEditor(new MyTools.C_SettingFromRowEdit(MyTools.EPosition.Vertical, Scope: true, Color: Brushes.LightSkyBlue),
                                                                                new MyTools.C_DefColumn(C.NegotiationAssistant.Objecte, WH, false, font: font),
                                                                                new MyTools.C_DefColumn(C.NegotiationAssistant.Sample, WH, false, font: font),
                                                                                new MyTools.C_DefColumn(C.NegotiationAssistant.Worker, WH, font: font),
                                                                                new MyTools.C_DefColumn(C.NegotiationAssistant.YMD, WH, font: font)
                                                                                ), 0);
            LoadWell();
        }
Beispiel #4
0
        private void LoadTC(EViewType ViewType)
        {
            size = new MyTools.C_MinMaxWidthHeight(180, Wrap: true, MinMaxName: 120);
            SFE  = new MyTools.C_SettingFromRowEdit(MyTools.EPosition.Vertical, true, -1, true, false, true);
            TC.Items.Clear();

            switch (ViewType)
            {
            case EViewType.Pollution:
            {
                var pollutions = Helpers.LogicHelper.PollutionLogic.Find();

                foreach (var pollution in pollutions)
                {
                    TabItem TI = new TabItem();
                    TI.Header  = pollution.CurtName;
                    TI.Content = MyTools.VerticalHorisontalScroll_From_Control(LoadBox(pollution));
                    TC.Items.Add(TI);
                }
                break;
            }

            case EViewType.Group:
            {
                var norms = Helpers.LogicHelper.ResolutionClarifyLogic.Find(DateControl_Class.SelectMonth);

                foreach (var one in PollutionBase_Class.AllCalculationFormul.GroupBy(x => x.ResolutionClarifyID))
                {
                    TabItem TI = new TabItem();
                    TI.Header  = PollutionBase_Class.AllResolution.First(x => x.ListResolutionClarify.Count(y => y.ID == one.Key) > 0).CurtName;
                    TI.Content = MyTools.VerticalHorisontalScroll_From_Control(LoadBox(one.ToArray()));
                    TC.Items.Add(TI);
                }
                break;
            }
            }
        }
        private void DrawObject()
        {
            ObjectGrid.ColumnDefinitions.Clear();
            ObjectGrid.RowDefinitions.Clear();
            ObjectGrid.Children.Clear();
            var MM_WH = new MyTools.C_MinMaxWidthHeight(250, Wrap: true, MinMaxName: 140);

            ObjectGrid.SetRowFromGrid(MyTools.GL_Auto);
            ObjectGrid.SetFromGrid(this.selectionWell.Well.GetEditor
                                   (
                                       SFE,
                                       new MyTools.C_DefColumn(C.Well.Number, MM_WH, false)
                                   ));
            ObjectGrid.SetRowFromGrid(MyTools.GL_Auto);
            ObjectGrid.SetFromGrid(this.selectionWell.Well.GetEditor
                                   (
                                       SFE,
                                       new MyTools.C_DefColumn(C.SelectionWell.DateTime, MM_WH, false)
                                   ));

            ObjectGrid.SetRowFromGrid(MyTools.GL_Auto);
            ObjectGrid.SetFromGrid(obj.Client.Detail.GetEditor
                                   (
                                       SFE,
                                       new MyTools.C_DefColumn(C.DetailsClient.FullName, MM_WH, false)
                                   ));
            ObjectGrid.SetRowFromGrid(MyTools.GL_Auto);
            ObjectGrid.SetFromGrid(obj.GetEditor
                                   (
                                       SFE,
                                       new MyTools.C_DefColumn(C.Objecte.AdresFact, MM_WH, false),
                                       new MyTools.C_DefColumn(C.Objecte.NumberFolder, MM_WH, false)
                                   ));

            //нужно пихнуть объёмы
        }