Exemplo n.º 1
0
        public string genHtmlPraylist(string rep)
        {
            List <object> works    = ProcessFactory.GetPraylistProcess().GetList().Cast <object>().ToList();
            string        res_html = "<h2>Прай-лист услуг предприятия ООО'Колорит'</h2><br/>";

            res_html += "<tr><td><b>Название рекламы</b></td><td><b>Носитель</b></td><td><b>Позиция</b></td><td><b>Стоимость (руб)</b></td></tr>";

            try
            {
                foreach (var work in works)
                {
                    PraylistDto WorkItem = (PraylistDto)work;
                    res_html += "<tr><td><p>" + WorkItem.NameReklama + "</p></td>";
                    res_html += "<td><p>" + WorkItem.NameCarrier + "</p></td>";
                    res_html += "<td><p>" + WorkItem.Position + "</p></td>";
                    res_html += "<td><p>" + WorkItem.Cost + "</p></td></tr>";
                }

                res_html = rep.Replace("[VRA_TABLE_REPORT]", res_html);
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message, "Ошибка");
            }

            return(res_html);
            // return "";
        }
Exemplo n.º 2
0
        public static Praylist Convert(PraylistDto debt)
        {
            if (debt == null)
            {
                return(null);
            }
            Praylist debtDto = new Praylist();

            debtDto.Cost        = debt.Cost;
            debtDto.NameCarrier = debt.NameCarrier;
            debtDto.Position    = debt.Position;
            debtDto.NameReklama = debt.NameReklama;
            return(debtDto);
        }