Exemple #1
0
        public static Int32 getCountNewProspects(Int32 iUserId)
        {
            List <ZipCodeBL> objlstZipCode = ZipCodeBL.getDataByLoginId(iUserId);
            List <UserBL>    lstUser       = new List <UserBL>();

            if (objlstZipCode != null)
            {
                foreach (ZipCodeBL objZipCode in objlstZipCode)
                {
                    SummitDS.UserDataTable thisTable     = getAdapter().GetDataByNewProspects(objZipCode.strZipCode);
                    List <UserBL>          lstTempUserBL = null;
                    if (thisTable != null && thisTable.Rows.Count > 0)
                    {
                        lstTempUserBL = BuildFromTable(thisTable);
                        foreach (UserBL objUser in lstTempUserBL)
                        {
                            lstUser.Add(objUser);
                        }
                    }
                }
            }
            if (lstUser != null && lstUser.Count > 0)
            {
                return(lstUser.Count);
            }
            return(0);
        }
Exemple #2
0
        private static List <ZipCodeBL> BuildFromTable(DataTable dtTable)
        {
            List <ZipCodeBL> _list = new List <ZipCodeBL>();

            if (dtTable != null)
            {
                foreach (DataRow dr in dtTable.Rows)
                {
                    ZipCodeBL _thisMember = new ZipCodeBL(dr);
                    _list.Add(_thisMember);
                }
            }
            return(_list);
        }