Ejemplo n.º 1
0
        ResidentialPSTNDto mapToResidentialPSTN(ResidentialPSTNRow pResidentialPSTNRow)
        {
            var _residentialPSTN = new ResidentialPSTNDto();

            _residentialPSTN.ANI          = pResidentialPSTNRow.ANI;
            _residentialPSTN.ServiceId    = pResidentialPSTNRow.Service_id;
            _residentialPSTN.Status       = pResidentialPSTNRow.AccountStatus;
            _residentialPSTN.RetailAcctId = pResidentialPSTNRow.Retail_acct_id;
            if (pResidentialPSTNRow.IsDate_first_usedNull)
            {
                _residentialPSTN.DateFirstUsed = pResidentialPSTNRow.Date_first_used;
            }
            else
            {
                _residentialPSTN.DateFirstUsed = Configuration.Instance.Db.SqlSmallDateTimeMaxValue;
            }
            if (pResidentialPSTNRow.IsDate_last_usedNull)
            {
                _residentialPSTN.DateLastUsed = pResidentialPSTNRow.Date_last_used;
            }
            else
            {
                _residentialPSTN.DateLastUsed = Configuration.Instance.Db.SqlSmallDateTimeMaxValue;
            }

            return(_residentialPSTN);
        }
Ejemplo n.º 2
0
        ResidentialPSTNDto[] mapToResidentialPSTNs(ResidentialPSTNRow[] pResidentialPSTNRows)
        {
            var _list = new ArrayList();

            if (pResidentialPSTNRows != null)
            {
                foreach (ResidentialPSTNRow _residentialPSTNRow in pResidentialPSTNRows)
                {
                    ResidentialPSTNDto _residentialPSTN = mapToResidentialPSTN(_residentialPSTNRow);
                    _list.Add(_residentialPSTN);
                }
            }
            return((ResidentialPSTNDto[])_list.ToArray(typeof(ResidentialPSTNDto)));
        }
Ejemplo n.º 3
0
        internal static ResidentialPSTNRow MapToResidentialPSTNRow(ResidentialPSTNDto pResidentialPSTN)
        {
            var _residentialPSTNRow = new ResidentialPSTNRow
            {
                AccountStatus  = pResidentialPSTN.Status,
                ANI            = pResidentialPSTN.ANI,
                Service_id     = pResidentialPSTN.ServiceId,
                Retail_acct_id = pResidentialPSTN.RetailAcctId
            };

            if (pResidentialPSTN.DateFirstUsed < Configuration.Instance.Db.SqlSmallDateTimeMaxValue && pResidentialPSTN.DateFirstUsed > DateTime.MinValue)
            {
                _residentialPSTNRow.Date_first_used = pResidentialPSTN.DateFirstUsed;
            }
            if (pResidentialPSTN.DateLastUsed < Configuration.Instance.Db.SqlSmallDateTimeMaxValue && pResidentialPSTN.DateLastUsed > DateTime.MinValue)
            {
                _residentialPSTNRow.Date_last_used = pResidentialPSTN.DateLastUsed;
            }

            return(_residentialPSTNRow);
        }