Пример #1
0
 private void notePredefiniteEditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     if (e.Button.Key == "modifica")
     {
         var form = new GestioneTestoHTML(sceltaCondominioCombo1.CondominioSelected, _note, MergeFieldType.Default, false, true);
         form.ShowDialog();
         _note = form.GetTesto();
         form.Dispose();
     }
     else if (e.Button.Key == "clear")
     {
         notePredefinite.Value = null;
         _note = string.Empty;
     }
 }
Пример #2
0
        private void modelliLetteraEditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            try
            {
                if (modelliLettera.Value != null)
                {
                    var idModello = modelliLettera.Value as int?;
                    if (idModello != null)
                    {
                        var modello = _modelloLetteraService.GetModelloLetteraById(idModello.Value);
                        var testoForm = new GestioneTestoHTML(sceltaCondominioCombo1.CondominioSelected, modello.Testo, MergeFieldType.Default, false, true);
                        if (testoForm.ShowDialog() == DialogResult.OK)
                        {
                            _testoLettera = testoForm.GetTesto();
                            if (modello.IdAzienda > 0)
                            {
                                if (CommonMessages.DisplayConfirm("Vuoi aggiornare anche il modello della lettera?") == DialogResult.Yes)
                                {
                                    modello.Testo = _testoLettera;
                                    _modelloLetteraService.SetModelloLettera(modello);
                                }
                            }
                        }

                        testoForm.Dispose();
                    }
                }
            }
            catch (Exception ex)
            {
                _log.ErrorFormat("Errore nel click del bottone di editor dei modelli - {0} - azienda:{1}", ex, Security.Login.Instance.CurrentLogin().Azienda);                
            }
        }
Пример #3
0
        private void modelliLetteraEditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            if (modelliLettera.Value != null)
            {
                var modello = getModelloLetteraService().GetModelloLetteraById((int)modelliLettera.Value);
                var testoForm = new GestioneTestoHTML(_condominio, modello.TestoHtml, MergeFieldType.Default, false, true);
                if (testoForm.ShowDialog() == DialogResult.OK)
                {
                    _testoLettera = testoForm.GetTesto();
                    if (modello.IdAzienda > 0)
                    {
                        if (CommonMessages.DisplayConfirm("Vuoi aggiornare anche il modello della lettera?") == DialogResult.Yes)
                        {
                            if (Gipasoft.Library.Utility.IsHtml(_testoLettera))
                                modello.TestoHtml = _testoLettera;
                            else
                                modello.Testo = _testoLettera;

                            getModelloLetteraService().SetModelloLettera(modello);
                        }
                    }
                }

                testoForm.Dispose();
            }
        }
Пример #4
0
 private void notePredefiniteEditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     switch (e.Button.Key)
     {
         case "modifica":
             {
                 var form = new GestioneTestoHTML(getCondominio(), _note, MergeFieldType.Default, false, true);
                 form.ShowDialog();
                 _note = form.GetTesto();
                 form.Dispose();
             }
             break;
         case "clear":
             notePredefinite.Value = null;
             _note = string.Empty;
             break;
     }
 }
Пример #5
0
        private void modelliNoteEditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            if (modelliNote.Value != null)
            {
                var nota = (NotaPredefinitaDTO)modelliNote.SelectedItem.ListObject;
                var testoForm = new GestioneTestoHTML(sceltaCondominioCombo1.CondominioSelected, nota.Testo, MergeFieldType.Default, false, true);
                if (testoForm.ShowDialog() == DialogResult.OK)
                    _note = testoForm.GetTesto();

                testoForm.Dispose();
            }
        }
 private void btnFirma_Click(object sender, EventArgs e)
 {
     var form = new GestioneTestoHTML(null, _impostazioneReportDTO.FirmaLetteraRtf, MergeFieldType.Default, true, true, true, "RTF");
     if (form.ShowDialog() != DialogResult.Cancel)
     {
         _impostazioneReportDTO.FirmaLetteraRtf = form.GetTesto("RTF");
     }
     form.Dispose();
 }
Пример #7
0
 private void notePredefiniteEditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
 {
     if (e.Button.Key == "clear")
     {
         notePredefinite.Value = null;
         _note = string.Empty;
     }
     else if (e.Button.Key == "edit")
     {
         var form = new GestioneTestoHTML(null, getNotaPredefinita(), MergeFieldType.Default, true, true, true);
         if (form.ShowDialog() != DialogResult.Cancel)
         {
             _note = form.GetTesto("RTF");
         }
         form.Dispose();
     }
 }
 private void btnIndirizzo_Click(object sender, EventArgs e)
 {
     var form = new GestioneTestoHTML(null, _impostazioneReportDTO.IndirizzoDestinatarioRtf, MergeFieldType.IndirizzoDestinatario, true, true, true, "RTF");
     if (form.ShowDialog() != DialogResult.Cancel)
     {
         _impostazioneReportDTO.IndirizzoDestinatarioRtf = form.GetTesto("RTF");
     }
     form.Dispose();
 }
 private void btnRiepilogoImporti_Click(object sender, EventArgs e)
 {
     var form = new GestioneTestoHTML(null, _impostazioneReportDTO.RiepilogoRtf, MergeFieldType.RiepilogoImportiBilancio, true, true, true, "RTF");
     if (form.ShowDialog() != DialogResult.Cancel)
     {
         _impostazioneReportDTO.RiepilogoRtf = form.GetTesto("RTF");
     }
     form.Dispose();
 }
Пример #10
0
 private void modelliNoteEditorButtonClick(object sender, EditorButtonEventArgs e)
 {
     switch (e.Button.Key)
     {
         case "dettaglioNota":
             if (modelliNote.Value != null && modelliNote.SelectedItem != null)
             {
                 var nota = modelliNote.SelectedItem.ListObject as NotaPredefinitaDTO;
                 if (nota != null)
                 {
                     var testoForm = new GestioneTestoHTML(_condominio, nota.TestoHtml, MergeFieldType.Default, false, true);
                     if (testoForm.ShowDialog() == DialogResult.OK)
                         _note = testoForm.GetTesto();
                     testoForm.Dispose();
                 }
             }
             break;
         case "clear":
             modelliNote.Value = null;
             break;
     }
 }
Пример #11
0
        private void listaClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
        {
            var notaPredefinitaDTO = e.Cell.Row.ListObject as NotaPredefinitaDTO;
            if(notaPredefinitaDTO != null)
            {
                var nota = notaPredefinitaDTO;

                if (e.Cell.Column.Key == "Testo")
                {
                    var form = new GestioneTestoHTML(null, nota.TestoHtml, MergeFieldType.Default, false, nota.IsDeleteAllow);
                    if (form.ShowDialog() != DialogResult.Cancel)
                    {
                        nota.TestoHtml = form.GetTesto();
                        nota.Testo = Gipasoft.Library.Conversione.RtfToString(nota.TestoHtml);
                        updateRow(e.Cell.Row);
                    }
                    form.Dispose();
                }

                if (e.Cell.Column.Key == "DeleteColumn")
                {
                    e.Cell.Row.Delete();
                }
            }
        }
Пример #12
0
 private void listaClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
 {
     if (e.Cell.Row.IsDataRow && e.Cell.Row.ListObject != null)
     {
         var modello = (ModelloLetteraTestoDTO)e.Cell.Row.ListObject;
         if (e.Cell.Column.Key == "Testo")
         {
             if (modello.Tipo != "Sms")
             {
                 if (string.IsNullOrEmpty(modello.TestoHtml))
                     modello.TestoHtml = "<HTML></HTML>"; 
                 
                 var form = new GestioneTestoHTML(null, modello.TestoHtml, MergeFieldType.Default, false, modello.IsUpdateAllow);
                 if (form.ShowDialog() == DialogResult.OK)
                 {
                     modello.TestoHtml = form.GetTesto();
                     setDaAggionare(modello);
                 }
                 form.Dispose();
             }
             else
             {
                 var form = new GestioneTestoPLAIN(modello.TestoHtml, modello.IsUpdateAllow);
                 if (form.ShowDialog() == DialogResult.OK)
                 {
                     modello.TestoHtml = form.GetTesto();
                     setDaAggionare(modello);
                 }
                 form.Dispose();
             }
         }
         if (e.Cell.Column.Key == "Oggetto")
         {
             var form = new GestioneTestoPLAIN(modello.Oggetto, modello.IsUpdateAllow);
             if (form.ShowDialog() == DialogResult.OK)
                 e.Cell.Value = form.GetTesto();
             form.Dispose();
         }
         if (e.Cell.Column.Key == "DeleteColumn")
         {
             if (!modello.IsDeleteAllow)
                 CommonMessages.DisplayWarning("Il modello di lettera è comune a tutti gli studi e non può essere eliminato.");
             else
             {
                 if (e.Cell.Row.Delete())
                     getModelloLetteraService().DeleteModelloLettera(modello);
             }
         }
     }
 }