/// <summary>Постановления</summary>
 protected void ResolutionClarify(Resolution resolution, bool show)
 {
     if (show)
     {
         Substitute.AddExchange($"{StaticMark.resolution_clarify} {resolution.CurtName}" + '}', resolution.GetResolutionClarify.Acts, 1);
     }
     else
     {
         Substitute.AddExchange($"{StaticMark.resolution_clarify} {resolution.CurtName}" + '}', e => { e.Row.ZeroHeight = true; }, 1);
     }
 }
 /// <summary>Адрес по объекту</summary>
 protected void ObjectAdres(Objecte objecte, bool full)
 {
     CP = new Control_Print();
     if (objecte.Separate)
     {
         DetailsObject details = objecte.Detail;
         if (details.MailAdres.Length > 0)
         {
             Substitute.AddExchange(StaticMark.adres_abonent, details.MailAdres.CutAdres(full), 0);
         }
         else if (details.LegalAdres.Length > 0)
         {
             Substitute.AddExchange(StaticMark.adres_abonent, details.LegalAdres.CutAdres(full), 0);
         }
         else
         {
             MessageBox.Show("Объект имеет индикатор абособленный, но адрес не задан!");
         }
     }
     else
     {
         DetailsClient Details   = objecte.Client.Detail;
         string        Storege   = string.Empty;
         bool          PostAdres = Details.AdresPostID != 0;
         if (PostAdres)
         {
             Substitute.AddExchange(StaticMark.adres_abonent, Helpers.LogicHelper.AdresLogic.FirstModel(Details.AdresPostID).Adr.CutAdres(full), 0);
         }
         else
         {
             CP.Elems.SetRowFromGrid(MyTools.GL_Auto);
             WrapPanel wp = new WrapPanel();
             wp.Orientation = Orientation.Vertical;
             if (Details.AdresLegalID > 0)
             {
                 RadioButton AdresLegal = new RadioButton();
                 AdresLegal.Content  = Helpers.LogicHelper.AdresLogic.FirstModel(Details.AdresLegalID).Adr;
                 AdresLegal.Checked += (sender, e) => { Storege = AdresLegal.Content.ToString(); };
                 wp.Children.Add(AdresLegal);
             }
             RadioButton AdresObj = new RadioButton();
             AdresObj.Content  = objecte.Adres;
             AdresObj.Checked += (sender, e) => { Storege = objecte.Adres; };
             wp.Children.Add(AdresObj);
             CP.Elems.SetFromGrid(wp);
             CP.ShowDialog();
         }
         if (!PostAdres)
         {
             Substitute.AddExchange(StaticMark.adres_abonent, Storege.CutAdres(full), 0);
         }
     }
 }
Exemple #3
0
        /// <summary>Заполнения оглавления</summary>
        private void ClientLoad()
        {
            Substitute.AddExchange(mark.client, $"{obj.Client.Detail.FullName}\n{obj.Adres}", 0);
            MonthYearSelect();

            var  workers = AdditionnTable.GetWorkers(data.ETypeTemplate.CalculationFees, true, "Расчёт");
            IRow row     = SearchRowFromMark(sheet, mark.job);

            foreach (var one in workers)
            {
                row.CopyRowTo(row.RowNum + 1);
                Substitute.AddExchange(mark.job, one.Post, 1);
                Substitute.AddExchange(mark.fio, one.FIO, 1);
            }
        }
Exemple #4
0
        private void FormulControl(BaseCalc_Class calc)
        {
            string formula = string.Empty;

            foreach (var one in PollutionBase_Class.AllCalculationFormul.Where(x => x.Label.Length > 0).OrderBy(x => x.Number).GroupBy(x => x.Label))
            {
                foreach (var pol in one.Select(x => x.PollutionID))
                {
                    if (calc.Value.Select(x => x.Pollution.ID).Contains(pol))
                    {
                        formula += $" + {one.Key}";
                        goto Next;
                    }
                }
                Substitute.AddExchange(one.Key, (e) => e.Row.ZeroHeight = true, 1);
                Next :;
            }
            Substitute.AddExchange(mark.formula, formula.Substring(3), 1);
        }
        /// <summary>Наименование клиента</summary>
        protected void ClientName(Client client, bool TypeClient = true)
        {
            DetailsClient Details = client.Detail;
            string        Storege = TypeClient ? client.TypeClient.InCase[(int)MyTools.ECases.Dative].Default + "\n" : string.Empty;

            switch (client.TypeClient.typeClient)
            {
            case data.ETypeClient.Individual:
            case data.ETypeClient.Physical:
            {
                Storege += TypeClient ? Details.NameInDative : Details.FullName;
                break;
            }

            case data.ETypeClient.Legal:
            {
                Storege += Details.FullName;
                break;
            }
            }
            Substitute.AddExchange(StaticMark.abonent, Storege, 1);
        }
 protected void WellNumber(SelectionWell sw)
 {
     Substitute.AddExchange(StaticMark.well, sw.Well.PresentNumber, 1);
 }
 /// <summary>Юридический адрес клиента</summary>
 protected void ClientAdres(Client client, bool full)
 {
     Substitute.AddExchange(StaticMark.legal_adres_abonent,
                            Helpers.LogicHelper.AdresLogic.FirstModel(client.Detail.AdresLegalID).Adr.CutAdres(full),
                            0);
 }
 /// <summary>Номер папки</summary>
 protected void NumberFolder(params int[] NumberFolder)
 {
     NumberFolder = NumberFolder.Distinct().ToArray();
     Substitute.AddExchange(StaticMark.number_folder, $"папк{(NumberFolder.Length > 1 ? 'и' : 'а')} {NumberFolder.Select(a => a.ToString()).Aggregate((a, b) => $"{a}, {b}")}", 0);
 }
 /// <summary>Месяц и год отбора</summary>
 protected void MonthYearSelect()
 {
     Substitute.AddExchange(StaticMark.year_month_select,
                            $"{MyTools.Month_From_M_C_R(MyTools.M_From_YM(DateControl_Class.SelectMonth), Reg: MyTools.ERegistor.ToLower)} {DateControl_Class.SelectYear} г.", 0);
 }
 /// <summary>Текущие месяц и год</summary>
 protected void MonthYear()
 {
     Substitute.AddExchange(StaticMark.month, MyTools.Month_From_M_C_R(DateTime.Now.Month, Reg: MyTools.ERegistor.ToLower), 0);
     Substitute.AddExchange(StaticMark.year, DateTime.Now.Year, 0);
 }