// GET
        protected override DriverResult Editor(SmsGatewayPart part, dynamic shapeHelper)
        {
            var smsPlaceholdersSettingsPart = _orchardServices.WorkContext.CurrentSite.As <SmsPlaceholdersSettingsPart>();
            var smsSettingsPart             = _orchardServices.WorkContext.CurrentSite.As <SmsSettingsPart>();

            // Controllo se conteggiare lo shortilink all'interno del messaggio
            bool shortlinkExist = false;

            ICommunicationService _communicationService;
            bool tryed = _orchardServices.WorkContext.TryResolve <ICommunicationService>(out _communicationService);

            if (tryed)
            {
                shortlinkExist = _communicationService.CampaignLinkExist(part);
            }

            // Tolgo 16 caratteri necessari per lo shortlink
            int MaxLenght = smsSettingsPart.MaxLenghtSms;

            //if (shortlinkExist) {
            //    MaxLenght = MaxLenght - 16;
            //}

            if (!smsSettingsPart.MamHaveAlias)
            {
                part.HaveAlias = false;
            }

            List <string> ListaAlias = null;

            if (smsSettingsPart.SmsFrom != "")
            {
                ListaAlias = new List <string>(smsSettingsPart.SmsFrom.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
            }

            var model = new SmsGatewayVM {
                Protocollo     = smsSettingsPart.Protocollo,
                AliasList      = ListaAlias,
                MaxLenghtSms   = MaxLenght,
                SmsGateway     = part,
                Settings       = smsPlaceholdersSettingsPart,
                ShortlinkExist = shortlinkExist
            };

            return(ContentShape("Parts_SmsGateway_Edit", () => shapeHelper.EditorTemplate(TemplateName: "Parts/SmsGateway_Edit", Model: model, Prefix: Prefix)));
        }
        // POST
        protected override DriverResult Editor(SmsGatewayPart part, IUpdateModel updater, dynamic shapeHelper)
        {
            var model = new SmsGatewayVM {
                SmsGateway = part
            };

            updater.TryUpdateModel(model, Prefix, null, new string[] { "Settings" });

            // reset Alias
            if (!part.HaveAlias)
            {
                part.Alias = null;
            }

            // reset Recipient List
            if (!part.SendToRecipientList)
            {
                part.RecipientList = null;
            }

            return(Editor(part, shapeHelper));
        }