Ejemplo n.º 1
0
 private mPin(ClassQuery cq)
 {
     ID = cq.GetInt32(0);
     SetName = cq.GetString(1);
     Context = cq.GetString(2);
     if (!cq.IsDBNull(3))
     {
         ExtensionNumber = cq.GetString(3);
         ExtensionDomain = cq.GetString(4);
     }
     PinNumber = cq.GetString(5);
     _originalPin = PinNumber;
 }
 internal static string GetSettingValue(SipProfileSettingTypes type, SipProfile profile)
 {
     string ret = null;
     ClassQuery cq = new ClassQuery("Org.Reddragonit.FreeSwitchConfig.DataCore.DB.Core",
         "Select sps.Value from SipProfileSetting sps WHERE sps.Profile.Name = @profileName AND sps.SettingType = @type");
     IDbDataParameter[] pars = new IDbDataParameter[]{
         cq.CreateParameter("@profileName",profile.Name),
         cq.CreateParameter("@type",type)
     };
     cq.Execute(pars);
     if (cq.Read())
         ret = cq.GetString(0);
     cq.Close();
     return ret;
 }