private List <ImportMapField> getMappedFields() { List <ImportMapField> mappedFields = new List <ImportMapField>(); ImportMapField mappedField = null; DropDownList ddlClaimRulerFields = null; Label lblYourFieldName = null; foreach (GridViewRow row in gvClaimFieldMap.Rows) { if (row.RowType == DataControlRowType.DataRow) { ddlClaimRulerFields = row.FindControl("ddlClaimRulerFields") as DropDownList; lblYourFieldName = row.FindControl("lblYourFieldName") as Label; if (ddlClaimRulerFields.SelectedIndex > 0) { // add those fields mapped by user only mappedField = new ImportMapField(); mappedField.UserFieldName = lblYourFieldName.Text; mappedField.ClaimRulerFieldName = ddlClaimRulerFields.SelectedValue; mappedFields.Add(mappedField); } } } return(mappedFields); }
private List<ImportMapField> getMappedFields() { List<ImportMapField> mappedFields = new List<ImportMapField>(); ImportMapField mappedField = null; DropDownList ddlClaimRulerFields = null; Label lblYourFieldName = null; foreach (GridViewRow row in gvClaimFieldMap.Rows) { if (row.RowType == DataControlRowType.DataRow) { ddlClaimRulerFields = row.FindControl("ddlClaimRulerFields") as DropDownList; lblYourFieldName = row.FindControl("lblYourFieldName") as Label; if (ddlClaimRulerFields.SelectedIndex > 0) { // add those fields mapped by user only mappedField = new ImportMapField(); mappedField.UserFieldName = lblYourFieldName.Text; mappedField.ClaimRulerFieldName = ddlClaimRulerFields.SelectedValue; mappedFields.Add(mappedField); } } } return mappedFields; }