Solved 3CX Integration Template

Discussion in '3CX Phone System - General' started by Syed Muhammad Yasir, Mar 28, 2017.

Thread Status:
Not open for further replies.
  1. Syed Muhammad Yasir

    Joined:
    Feb 24, 2017
    Messages:
    16
    Likes Received:
    0
    How can I get the username and password from BasicConfigurationControl UI textboxes to MySession. Cs?
    Retrive information from UI.
     
  2. XanthiZ

    3CX Support

    Joined:
    Dec 18, 2015
    Messages:
    46
    Likes Received:
    7
    Hello There,

    First let me explain to you how the plugin saves the parameters .
    From the "BasIcConfigurationControl.cs" > "Save()" method we are saving the parameters in a 3CXCRMUser.ini file
    This ini file will be generated here : %appdata%\3CXPhone for Windows\3CXCRMUser.ini
    We are saving them to the INI file so it will be easily accessible from different classes.

    To save the parameters you can use the code :
    Code:
     _configurationManager.SetValue(ConfigurationParameters.UserName, txtUserName.Text);
    _configurationManager.SetCryptedValue(ConfigurationParameters.Password, txtPassword.Text);
    
    To get the value of the Username use the code :
    Code:
    _configurationManager.GetValue(ConfigurationParameters.UserName, String.Empty)
    To get the value of the Password use the code:
    Code:
    _configurationManager.GetCryptedValue(ConfigurationParameters.Password, String.Empty)
    You can change the parameters you want to save from the ConfigurationParameters.cs file.
    If you have any other questions please let me know.

    Regards
    Xanthi Zachariou.
     
  3. Syed Muhammad Yasir

    Joined:
    Feb 24, 2017
    Messages:
    16
    Likes Received:
    0
    Thank you so much :) it worked :)
     
Thread Status:
Not open for further replies.