public static SearchResultSubscribeDto GetInstance(IDictionary<string, object> item)
        {
            // make sure this is a policy one
            if ((item["ContentType"] != null) && (item["ContentType"].ToString().ToLower().Equals("policy\n\ninsured")))
            {
                var newItem = new SearchResultSubscribeDto();
                newItem.PolicyId = (GetItemObject(item, "VALPolID") == null) ? null : item["VALPolID"].ToString();
                newItem.InsuredName = (GetItemObject(item, "VALInsdNm") == null) ? null : item["VALInsdNm"].ToString();
                newItem.BrokerCode = (GetItemObject(item, "VALBkrCd") == null) ? null : item["VALBkrCd"].ToString();
                newItem.BrokerPsu = (GetItemObject(item, "VALBkrPsu") == null) ? null : item["VALBkrPsu"].ToString();
                newItem.AccountingYear = (GetItemObject(item, "VALAcctgYr") == null) ? null : item["VALAcctgYr"].ToString();
                newItem.COB = (GetItemObject(item, "VALCob") == null) ? null : item["VALCob"].ToString();
                newItem.Division = (GetItemObject(item, "VALDivision") == null) ? null : item["VALDivision"].ToString();
                newItem.EntryStatus = (GetItemObject(item, "VALEntSt") == null) ? null : item["VALEntSt"].ToString();
                newItem.Insureds = (GetItemObject(item, "VALInsds") == null) ? null : item["VALInsds"].ToString();
                //newItem.InceptionDate = (GetItemObject(item, "VALIncpDt") == null) ? null : item["VALIncpDt"].ToString();
                newItem.Leader = (GetItemObject(item, "VALLdr") == null) ? null : item["VALLdr"].ToString();
                newItem.OriginatingOffice = (GetItemObject(item, "VALOrigOff") == null) ? null : item["VALOrigOff"].ToString();
                newItem.Status = (GetItemObject(item, "VALSt") == null) ? null : item["VALSt"].ToString();
                newItem.Underwriter = (GetItemObject(item, "VALUwr") == null) ? null : item["VALUwr"].ToString();
                newItem.HitHightlightSummary = (GetItemObject(item, "HITHIGHLIGHTEDSUMMARY") == null) ? null : item["HITHIGHLIGHTEDSUMMARY"].ToString();
                newItem.Description = (GetItemObject(item, "VALDsc") == null)
                                          ? null
                                          : item["VALDsc"].ToString();

                newItem.BrokerName = (GetItemObject(item, "VALBkrNm") == null) ? null : item["VALBkrNm"].ToString();

                var limit = GetItemObject(item, "VALLmtAmt");
                if (limit == null)
                    newItem.Limit = null;
                else
                    newItem.Limit = Decimal.Parse(limit.ToString());

                var excess = GetItemObject(item, "VALExsAmt");
                if (excess == null)
                    newItem.Excess = null;
                else
                    newItem.Excess = Decimal.Parse(excess.ToString());

                var inceptionDate = GetItemObject(item, "VALIncpDt");
                if (inceptionDate == null)
                    newItem.InceptionDate= null;
                else
                    newItem.InceptionDate = DateTime.ParseExact(inceptionDate.ToString(), "yyyyMMdd", CultureInfo.InvariantCulture);

                var expiryDate = GetItemObject(item, "VALExpydt");
                if (expiryDate == null)
                    newItem.ExpiryDate = null;
                else
                    newItem.ExpiryDate = DateTime.ParseExact(expiryDate.ToString(), "yyyyMMdd", CultureInfo.InvariantCulture);

                newItem.View = _View;

                //Clickthrough
                newItem.pisearchresultid = (GetItemObject(item, "piSearchResultId") == null) ? null : item["piSearchResultId"].ToString();
                return newItem;
            }
            return null;
        }
        public static SearchResultSubscribeDto GetInstance(IDictionary <string, object> item)
        {
            // make sure this is a policy one
            if ((item["ContentType"] != null) && (item["ContentType"].ToString().ToLower().Equals("policy\n\ninsured")))
            {
                var newItem = new SearchResultSubscribeDto();
                newItem.PolicyId       = (GetItemObject(item, "VALPolID") == null) ? null : item["VALPolID"].ToString();
                newItem.InsuredName    = (GetItemObject(item, "VALInsdNm") == null) ? null : item["VALInsdNm"].ToString();
                newItem.BrokerCode     = (GetItemObject(item, "VALBkrCd") == null) ? null : item["VALBkrCd"].ToString();
                newItem.BrokerPsu      = (GetItemObject(item, "VALBkrPsu") == null) ? null : item["VALBkrPsu"].ToString();
                newItem.AccountingYear = (GetItemObject(item, "VALAcctgYr") == null) ? null : item["VALAcctgYr"].ToString();
                newItem.COB            = (GetItemObject(item, "VALCob") == null) ? null : item["VALCob"].ToString();
                newItem.Division       = (GetItemObject(item, "VALDivision") == null) ? null : item["VALDivision"].ToString();
                newItem.EntryStatus    = (GetItemObject(item, "VALEntSt") == null) ? null : item["VALEntSt"].ToString();
                newItem.Insureds       = (GetItemObject(item, "VALInsds") == null) ? null : item["VALInsds"].ToString();
                //newItem.InceptionDate = (GetItemObject(item, "VALIncpDt") == null) ? null : item["VALIncpDt"].ToString();
                newItem.Leader               = (GetItemObject(item, "VALLdr") == null) ? null : item["VALLdr"].ToString();
                newItem.OriginatingOffice    = (GetItemObject(item, "VALOrigOff") == null) ? null : item["VALOrigOff"].ToString();
                newItem.Status               = (GetItemObject(item, "VALSt") == null) ? null : item["VALSt"].ToString();
                newItem.Underwriter          = (GetItemObject(item, "VALUwr") == null) ? null : item["VALUwr"].ToString();
                newItem.HitHightlightSummary = (GetItemObject(item, "HITHIGHLIGHTEDSUMMARY") == null) ? null : item["HITHIGHLIGHTEDSUMMARY"].ToString();
                newItem.Description          = (GetItemObject(item, "VALDsc") == null)
                                          ? null
                                          : item["VALDsc"].ToString();

                newItem.BrokerName = (GetItemObject(item, "VALBkrNm") == null) ? null : item["VALBkrNm"].ToString();

                var limit = GetItemObject(item, "VALLmtAmt");
                if (limit == null)
                {
                    newItem.Limit = null;
                }
                else
                {
                    newItem.Limit = Decimal.Parse(limit.ToString());
                }

                var excess = GetItemObject(item, "VALExsAmt");
                if (excess == null)
                {
                    newItem.Excess = null;
                }
                else
                {
                    newItem.Excess = Decimal.Parse(excess.ToString());
                }

                var inceptionDate = GetItemObject(item, "VALIncpDt");
                if (inceptionDate == null)
                {
                    newItem.InceptionDate = null;
                }
                else
                {
                    newItem.InceptionDate = DateTime.ParseExact(inceptionDate.ToString(), "yyyyMMdd", CultureInfo.InvariantCulture);
                }

                var expiryDate = GetItemObject(item, "VALExpydt");
                if (expiryDate == null)
                {
                    newItem.ExpiryDate = null;
                }
                else
                {
                    newItem.ExpiryDate = DateTime.ParseExact(expiryDate.ToString(), "yyyyMMdd", CultureInfo.InvariantCulture);
                }

                newItem.View = _View;

                //Clickthrough
                newItem.pisearchresultid = (GetItemObject(item, "piSearchResultId") == null) ? null : item["piSearchResultId"].ToString();
                return(newItem);
            }
            return(null);
        }