/// <summary>
        /// Get IC detail  for license insurance
        /// </summary>
        /// <param name="filterRequestParam">FilterRequestParam</param>
        /// <returns>ICResponseParam</returns>
        /// <createdBy>Sumit Saurav</createdBy>
        /// <createdDate>Aug 26 2013</createdDate>
        public IEnumerable <ICResponseParam> GetICdetailforLicIns(FilterRequestParam filterRequestParam)
        {
            IEnumerable <ICResponseParam> finallist = null;

            try
            {
                int vendorTypeId = Convert.ToInt32(filterRequestParam.vendortypefilter);
                using (objDecisionPointEntities = new DecisionPointEntities())
                {
                    // entity query for fetch individual reqiured documents record  as per user Id
                    var query = (from staff in objDecisionPointEntities.DP_ComapnyVendorMapping
                                 join user in objDecisionPointEntities.DP_User
                                 on staff.VendorId equals user.Id
                                 join profile in objDecisionPointEntities.DP_Profile
                                 on user.Id equals profile.UserId
                                 join VTM in objDecisionPointEntities.DP_VendorTypeMapping
                                 on new { a = (int)(staff.VendorId == null ? 0 : staff.VendorId), b = staff.CompanyId } equals new { a = VTM.UserId, b = VTM.CreaterCompanyId }
                                 into VT
                                 from FVT in VT.DefaultIfEmpty()
                                 join VenMaster in objDecisionPointEntities.DP_VendorType
                                 on FVT.VendorTypeId equals VenMaster.Id
                                 into Vmaster
                                 from FVenmasterT in Vmaster.DefaultIfEmpty()
                                 //
                                 where staff.CompanyId == filterRequestParam.CompanyId && user.IsActive == true && staff.IsActive == true && profile.UserType == Shared.IC &&
                                 FVT.IsDefault == true
                                 //&& staff.Status == 1 && user.IsRegistered == true
                                 select new ICResponseParam
                    {
                        Fname = profile.Firstname,
                        Lname = profile.LastName,
                        EmailId = user.EmailId,
                        Phone = profile.CellNumber == null ? string.Empty : profile.CellNumber,
                        Id = user.Id,
                        IsActive = (bool)(user.IsActive == null ? false : user.IsActive),
                        BusinessName = profile.BusinessName == null ? string.Empty : profile.BusinessName,
                        CompanyId = user.CompanyId,
                        InvitationStatus = (bool)(staff.Invitationstatus == null ? false : staff.Invitationstatus),
                        VTId = FVenmasterT.Id == null ? 0 : FVenmasterT.Id,
                        VType = FVenmasterT.VendorType == null ? string.Empty : FVenmasterT.VendorType
                    }).Distinct().ToList().OrderBy(x => x.Lname).Where(x => x.VTId == vendorTypeId);
                    finallist = query;
                }

                return(finallist);
            }
            catch
            {
                throw;
            }
        }
        /// <summary>
        /// Used for Save Additional Credentials details in mapping from JCR
        /// </summary>
        /// <param name="addReqId"></param>
        /// <param name="objLicenseInsuranceRequestParam"></param>
        /// <param name="icTypeId"></param>
        /// <createdby>bobi</createdby>
        /// <createddate>3 june 2014</createddate>
        private void SaveAdditionalReqToMappingFromJCR(int addReqId, LicenseInsuranceRequestParam objLicenseInsuranceRequestParam, string icTypeId)
        {
            FilterRequestParam objFilterRequestParam = null;

            try
            {
                objFilterRequestParam                  = new FilterRequestParam();
                objFilterRequestParam.CompanyId        = objLicenseInsuranceRequestParam.CompanyId;
                objFilterRequestParam.vendortypefilter = icTypeId;

                //get IC list of company
                objFilterRequestParam.type = 1;
                IEnumerable <ICResponseParam> IClist = GetICdetailforLicIns(objFilterRequestParam);
                using (objDecisionPointEntities = new DecisionPointEntities())
                {
                    foreach (var IC in IClist)
                    {
                        var addReqMappingDetails = (from docrec in objDecisionPointEntities.DP_AdditionalReqMapping
                                                    where docrec.AddReqId == addReqId && docrec.UserId == IC.Id && docrec.CompanyId == IC.CompanyId
                                                    select docrec).FirstOrDefault();
                        if (addReqMappingDetails == null)
                        {
                            DP_AdditionalReqMapping objDPAdditionalReqMapping = new DP_AdditionalReqMapping()
                            {
                                AddReqId  = addReqId,
                                CompanyId = IC.CompanyId,
                                UserId    = IC.Id,
                                Status    = Shared.Pending
                            };
                            objDecisionPointEntities.DP_AdditionalReqMapping.Add(objDPAdditionalReqMapping);
                        }
                        else
                        {
                            addReqMappingDetails.AddReqId  = addReqId;
                            addReqMappingDetails.CompanyId = IC.CompanyId;
                            addReqMappingDetails.UserId    = IC.Id;
                        }
                    }
                    objDecisionPointEntities.SaveChanges();
                }
            }
            catch
            {
                throw;
            }
        }