public void bindData(int policyID, int limitType) { List <PolicySubLimit> limits = null; PolicySubLimit limit = null; limits = PolicySublimitManager.GetAll(policyID, limitType); if (limits != null && limits.Count == 0) { switch (limitType) { case 1: // property limits limits = primePropertyLimits(); break; default: break; } } else { // add a blank entry to allow new entry limit = new PolicySubLimit(); limit.LimitType = LimitType.LIMIT_TYPE_PROPERTY; limits.Add(limit); } gvLimits.DataSource = limits; gvLimits.DataBind(); }
public void bindData(int claimID) { List <ClaimSubLimit> claimSublimits = null; ClaimSubLimit subLimitBlank = null; string[] sublimitAmounts = null; policySublimits = PolicySublimitManager.GetAll(policyID, LimitType.LIMIT_TYPE_PROPERTY); if (policySublimits != null && policySublimits.Count > 0) { sublimitAmounts = policySublimits.Select(x => x.Sublimit.ToString()).ToArray(); hf_SublimitAmounts.Value = string.Join("|", sublimitAmounts); } claimSublimits = ClaimSubLimitManager.GetAll(claimID); if (claimSublimits != null) { subLimitBlank = new ClaimSubLimit(); claimSublimits.Add(subLimitBlank); } gvLimits.DataSource = claimSublimits; gvLimits.DataBind(); }