/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void BindLookupAttributeValues(object sender, EventArgs e) { string lkFieldName = LookupCodesList.Value; string lkpAttributeId = LookupAttributesList.Value; // determine if using textbox(default) to build value or dropdown list string lkpAttributeValue = string.Empty; if (!string.IsNullOrEmpty(LookupAttributeValue.Value)) { lkpAttributeValue = LookupAttributeValue.Value; } else if (!string.IsNullOrEmpty(ExistingAttributeValues.Value)) { lkpAttributeValue = ExistingAttributeValues.Value; } if (!string.IsNullOrEmpty(lkFieldName) && !string.IsNullOrEmpty(lkpAttributeId) && !string.IsNullOrEmpty(lkpAttributeValue)) { selectedAttributeValue = lkpAttributeValue; LookupCodeDa da = new LookupCodeDa(); DataView dv = da.GetLookupCodeAttributesByLkpFieldAndAttribute(lkFieldName, int.Parse(lkpAttributeId), lkpAttributeValue).DefaultView; LookupAttributesGrid.DataSource = dv; LookupAttributesGrid.DataBind(); GridPanel.Visible = true; UpdateBtn.Visible = true; } else { GridPanel.Visible = false; UpdateBtn.Visible = false; } dirtyRows = new List <int>(); }
protected void BuildLookupCodeByAttribute(object sender, EventArgs e) { string lkpAttributeId = FilterByAttributeNames.Value; string lkpAttributeValue = FilterByAttributeValues.Value; if (!string.IsNullOrEmpty(lkpAttributeValue)) { LookupCodeDa da = new LookupCodeDa(); var codeByAttribute = da.GetLookupCodeAttributesByLkpFieldAndAttribute(CurrentLkpFieldName.Value, int.Parse(lkpAttributeId), lkpAttributeValue); SetLookupCodeGridFilter(codeByAttribute, "ApplyToAttribute", LookupCodeAttribute.LookupCodeAttributeId); } }