コード例 #1
0
        public static void Salvar(XtraReport xtraReport, string IdentificadorTela)
        {
            xtraReport.DisplayName = (xtraReport.DisplayName.Length > 0 ? xtraReport.DisplayName : IdentificadorTela).Treat();

            var transacao = 0;

            Conexao.Iniciar(ref transacao);

            if (!Conexao.Banco.TB_DIV_MENUs.Any(a => a.ID_MENU == IdentificadorTela))
            {
                Conexao.Banco.TB_DIV_MENUs.InsertOnSubmit(new TB_DIV_MENU {
                    ID_MENU = IdentificadorTela, DS_MENU = xtraReport.DisplayName
                });
                Conexao.Enviar();
            }

            Conexao.Banco.CAD_DIV_RELATORIO(0, IdentificadorTela, xtraReport.DisplayName, xtraReport.Save());
            Conexao.Finalizar(ref transacao);
        }