コード例 #1
0
    public string[] GetCompletionList(string prefixText, int count)
    {
        AddressBookManager adm = new AddressBookManager();

        prefixText = prefixText.ToLower();
        StringCollection list = adm.UserNameList;

        List <string> suggestions = new List <string>();

        int i = 0;

        foreach (string s in list)
        {
            string lowerS = s.ToLower();

            if (lowerS.StartsWith(prefixText))
            {
                suggestions.Add(s);
                if (i == 20)
                {
                    break;
                }
                else
                {
                    i++;
                }
            }
        }
        return(suggestions.ToArray());
    }
コード例 #2
0
ファイル: AjaxProxy.asmx.cs プロジェクト: sebbalex/PITre
        public virtual string[] GetListaComuni(string prefixText, string contextKey)
        {
            string[] listaTemp = null;

            listaTemp = AddressBookManager.GetListaComuni(prefixText);

            return(listaTemp);
        }
コード例 #3
0
 private void Awake()
 {
     if (Singleton != null)
     {
         Destroy(this);
     }
     else
     {
         Singleton = this;
     }
 }
コード例 #4
0
        protected void DocumentImgAddNewCorrispondent_Click(object sender, ImageClickEventArgs e)
        {
            Session.Remove("selCorrDaRubrica");

            DocsPaWR.Corrispondente corr = null;

            if (!string.IsNullOrEmpty(this.TxtCodeSender.Text) && !string.IsNullOrEmpty(this.TxtDescriptionSender.Text))
            {
                corr = AddressBookManager.getCorrispondenteRubrica(TxtCodeSender.Text, DocsPaWR.RubricaCallType.CALLTYPE_LISTE_DISTRIBUZIONE);

                if (corr != null && !string.IsNullOrEmpty(corr.systemId))
                {
                    if (!verificaDuplicazioneCorr(corr))
                    {
                        if (ViewState["dsCorr"] == null)
                        {
                            DataTable dt = new DataTable();
                            dt.Columns.Add("ID_DPA_CORR");
                            dt.Columns.Add("VAR_DESC_CORR");
                            dt.Columns.Add("VAR_COD_RUBRICA");
                            dt.Columns.Add("CHA_TIPO_IE");
                            dt.Columns.Add("CHA_DISABLED_TRASM");
                            dsCorrispondenti = new DataSet();
                            dsCorrispondenti.Tables.Add(dt);
                            ViewState.Add("dsCorr", dsCorrispondenti);
                        }

                        DataRow dr = ((DataSet)ViewState["dsCorr"]).Tables[0].NewRow();
                        dr[0] = corr.systemId;
                        dr[1] = corr.descrizione;
                        if (corr.disabledTrasm)
                        {
                            dr[4] = "1";
                        }
                        else
                        {
                            dr[4] = "0";
                        }
                        ((DataSet)ViewState["dsCorr"]).Tables[0].Rows.Add(dr);
                        gridViewResult.DataSource = ((DataSet)ViewState["dsCorr"]);
                        gridViewResult.DataBind();
                        TxtCodeSender.Text        = "";
                        TxtDescriptionSender.Text = "";
                        this.UpnlGrid.Update();
                    }
                    else
                    {
                        this.TxtCodeSender.Text        = "";
                        this.TxtDescriptionSender.Text = "";
                        this.UpnlGrid.Update();
                    }
                }
            }
        }
コード例 #5
0
 public EditViewModel(Person person, AddressBookManager addressBookManager, EventAggregator eventAggregator)
 {
     _eventAggregator    = eventAggregator;
     _addressBookManager = addressBookManager;
     _person             = person;
     Name    = person.Name;
     Surname = person.Surname;
     Address = person.Address;
     Phone   = person.Phone;
     Email   = person.Email;
 }
コード例 #6
0
        public AddressBookViewModel(
            EventAggregator eventAggregator,
            WindowManager windowManager,
            AddressBookManager addressBookManager

            )
        {
            _eventAggregator = eventAggregator;
            eventAggregator.Subscribe(this);
            _windowManager      = windowManager;
            _addressBookManager = addressBookManager;
        }
コード例 #7
0
        protected void BtnLog_Click(object sender, EventArgs e)
        {
            string msg = "";

            foreach (string log in AddressBookManager.getLogImportRubrica())
            {
                msg += log + "<br />\n";
            }
            this.litMessage.Text = msg;

            this.plcFile.Visible = false;

            this.BtnLog.Enabled     = false;
            this.BtnConfirm.Enabled = false;
        }
コード例 #8
0
        protected void BtnConfirm_Click(object sender, EventArgs e)
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "reallowOp", "reallowOp();", true);

            //Controllo la selezione file
            if (string.IsNullOrEmpty(this.uploadFile.Value))
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialog", "ajaxDialogModal('ErrorAddressBookImportFileInvalid', 'error');", true);
                return;
            }

            //Controllo che sia un file Excel
            if (this.uploadFile.Value != "")
            {
                if (this.uploadFile.Value != null)
                {
                    string[] path = this.uploadFile.Value.Split('.');
                    if (path.Length != 0 && path[path.Length - 1] != "xls")
                    {
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialog", "ajaxDialogModal('ErrorAddressBookImportXlsInvalid', 'error');", true);
                        return;
                    }
                }
            }

            //Inizio importazione
            HttpPostedFile p  = this.uploadFile.PostedFile;
            Stream         fs = p.InputStream;

            byte[] dati = new byte[fs.Length];
            fs.Read(dati, 0, (int)fs.Length);
            fs.Close();
            bool esitoImport = true;

            esitoImport = AddressBookManager.ImportaRubrica(dati, this.EnableDistributionLists, ref corrInseriti, ref corrAggiornati, ref corrRimossi, ref corrNonInseriti, ref corrNonAggiornati, ref corrNonRimossi);
            if (!esitoImport)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialog", "ajaxDialogModal('ErrorAddressBookImportTemplateInvalid', 'error');", true);
                this.litMessage.Text = this.GetLabel("AddressBookImportTemplateInvalid");
            }
            else
            {
                this.litMessage.Text = String.Format(this.GetLabel("AddressBookImportResult"), corrInseriti, corrAggiornati, corrRimossi, corrNonInseriti, corrNonAggiornati, corrNonRimossi);
            }
            this.plcMessage.Visible = true;

            this.BtnLog.Visible = true;
        }
コード例 #9
0
 private void BindFilterValues()
 {
     foreach (DocsPaWR.FiltroProcessoFirma item in this.FiltroRicerca)
     {
         if (item.Argomento == DocsPaWR.FiltriProcessoFirma.ID_RUOLO_VISIBILITA.ToString())
         {
             DocsPaWR.Corrispondente corr = AddressBookManager.GetCorrespondentBySystemId(item.Valore);
             if (corr != null)
             {
                 this.txtCodiceRuolo.Text      = corr.codiceRubrica;
                 this.txtDescrizioneRuolo.Text = corr.descrizione;
             }
             this.idRuolo.Value = item.Valore;
         }
         if (item.Argomento == DocsPaWR.FiltriProcessoFirma.DESC_RUOLO_VISIBILITA.ToString())
         {
             this.txtDescrizioneRuolo.Text = item.Valore;
         }
     }
 }
コード例 #10
0
 protected void TxtCodeSender_TextChanged(object sender, EventArgs e)
 {
     DocsPaWR.Corrispondente corr = null;
     if (TxtCodeSender.Text != "")
     {
         corr = AddressBookManager.getCorrispondenteRubrica(TxtCodeSender.Text, DocsPaWR.RubricaCallType.CALLTYPE_LISTE_DISTRIBUZIONE);
     }
     if (corr == null)
     {
         if (TxtCodeSender.Text != "")
         {
             string msg = "WarningDocumentCorrNotFound";
             ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "if (parent.fra_main) {parent.fra_main.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');} else {parent.ajaxDialogModal('" + msg.Replace("'", @"\'") + "', 'warning', '');}", true);
         }
         TxtDescriptionSender.Text = "";
     }
     else
     {
         TxtDescriptionSender.Text = corr.descrizione;
     }
 }
コード例 #11
0
        private void BindFilterValues()
        {
            try
            {
                foreach (DocsPaWR.FiltroProcessoFirma item in this.FiltersProcesses)
                {
                    #region ORDINAMENTO
                    if (item.Argomento == DocsPaWR.FiltriProcessoFirma.ORDER_FIELD.ToString())
                    {
                        this.ddlOrder.SelectedValue = item.Valore;
                    }

                    if (item.Argomento == DocsPaWR.FiltriProcessoFirma.ORDER_DIRECTION.ToString())
                    {
                        this.ddlAscDesc.SelectedValue = item.Valore;
                    }
                    #endregion

                    #region RUOLO COINVOLTO
                    if (item.Argomento == DocsPaWR.FiltriProcessoFirma.RUOLO_COINVOLTO.ToString())
                    {
                        DocsPaWR.Corrispondente corr = AddressBookManager.GetCorrespondentBySystemId(item.Valore);
                        if (corr != null)
                        {
                            this.txtCodiceRuoloTitolare.Text      = corr.codiceRubrica;
                            this.txtDescrizioneRuoloTitolare.Text = corr.descrizione;
                        }
                        this.idRuoloTitolare.Value = item.Valore;
                    }
                    #endregion

                    #region UTENTE COINVOLTO
                    else if (item.Argomento == DocsPaWR.FiltriProcessoFirma.UTENTE_COINVOLTO.ToString())
                    {
                        DocsPaWR.Corrispondente corr = AddressBookManager.GetCorrespondentBySystemId(item.Valore);
                        if (corr != null)
                        {
                            this.txtCodiceUtenteTitolare.Text      = corr.codiceRubrica;
                            this.txtDescrizioneUtenteTitolare.Text = corr.descrizione;
                        }
                        this.idUtenteTitolare.Value = item.Valore;
                    }
                    #endregion

                    #region TIPO

                    else if (item.Argomento == DocsPaWR.FiltriProcessoFirma.TIPO_MODELLO.ToString())
                    {
                        this.cbl_TipoProcesso.Items.FindByValue("M").Selected = Convert.ToBoolean(item.Valore);
                    }
                    else if (item.Argomento == DocsPaWR.FiltriProcessoFirma.TIPO_PROCESSO.ToString())
                    {
                        this.cbl_TipoProcesso.Items.FindByValue("P").Selected = Convert.ToBoolean(item.Valore);
                    }

                    #endregion

                    #region NOME
                    else if (item.Argomento == DocsPaWR.FiltriProcessoFirma.NOME.ToString())
                    {
                        this.txtNome.Text = item.Valore;
                    }
                    #endregion

                    #region STATO

                    else if (item.Argomento == DocsPaWR.FiltriProcessoFirma.VALIDO.ToString())
                    {
                        this.cbl_StatoProcesso.Items.FindByValue("V").Selected = Convert.ToBoolean(item.Valore);
                    }
                    else if (item.Argomento == DocsPaWR.FiltriProcessoFirma.INVALIDO.ToString())
                    {
                        this.cbl_StatoProcesso.Items.FindByValue("I").Selected = Convert.ToBoolean(item.Valore);
                    }

                    #endregion
                }
            }
            catch (Exception e)
            {
            }
        }