Exemple #1
0
        public static List <CabinaDto> GetCabinas(CustomerAcctDto pCustomerAcct)
        {
            var _cabinas = new List <CabinaDto>();

            using (var _db = new Rbr_Db()) {
                DialPeerRow[] _dialPeerRows = CustomerAcctManager.GetDialPeersByAcctId(_db, pCustomerAcct.CustomerAcctId);
                if (_dialPeerRows != null && _dialPeerRows.Length > 0)
                {
                    EndPointRow[] _endPointRows = EndpointManager.GetAllByCustomerAcct(_db, pCustomerAcct.CustomerAcctId);
                    if (_endPointRows != null && _endPointRows.Length > 0)
                    {
                        foreach (DialPeerRow _dialpeerRow in _dialPeerRows)
                        {
                            if (_dialpeerRow.Prefix_in != string.Empty && _dialpeerRow.Prefix_in != "#")
                            {
                                var _cabina = new CabinaDto(_dialpeerRow.End_point_id, getIP(_endPointRows, _dialpeerRow.End_point_id), _dialpeerRow.Prefix_in, _dialpeerRow.Customer_acct_id);
                                _cabinas.Add(_cabina);
                            }
                        }
                    }
                }
            }
            return(_cabinas);
        }
Exemple #2
0
 //cust access list (will return Frontend list if Customer is retail)
 public static EndPointRow[] GetEndpointsByCustomerAcct(short pCustomerAcctId)
 {
     using (var _db = new Rbr_Db()) {
         return(EndpointManager.GetAllByCustomerAcct(_db, pCustomerAcctId));
     }
 }