public void SetNASCustomFieldTypeBuiltInMultiSelectionListStrategy (NASCustomFieldTypeBuiltInMultiSelectionListStrategy strategy) { NASCustomFieldTypeBuiltInMultiSelectionListStrategy = strategy; NASCustomFieldTypeBuiltInMultiSelectionListStrategy.InitXpoDatasource(datasource); NASCustomFieldTypeBuiltInMultiSelectionListStrategy.InitGridLookup(grdlookupItemMenu); }
public bool NASCustomFieldTypeBuiltInMultiSelectionListControlDataViewingState_CRUD() { List <NASCustomFieldPredefinitionData> data = NASCustomFieldTypeBuiltInMultiSelectionListStrategy.GetPredefinitionDataOfObject(ObjectCustomFieldId); string displayText = String.Empty; if (data != null && data.Count > 0) { foreach (var item in data) { string tempText = item.Name == null || item.Name.Trim().Length == 0 ? item.Code : item.Name; if (data.IndexOf(item) == 0) { displayText += tempText; } else { displayText += String.Format("; {0}", tempText); } } } else { displayText = "Chỉnh sửa"; } hyperlinkBuiltInMultiSelectionListDataViewing.Text = displayText; return(true); }
public bool NASCustomFieldTypeBuiltInMultiSelectionListControlDataEditingState_PreTransitionCRUD(string transition) { if (transition.ToUpper() .Equals(NASCustomFieldTypeControlStateTransition.UpdateTransition.TransitionName)) { List <NASCustomFieldPredefinitionData> data = NASCustomFieldTypeBuiltInMultiSelectionListStrategy.GetSelectedPredefinitionDataFromList(grdlookupItemMenu); //Update data of custom field by ObjectCustomFieldId if (NASCustomFieldTypeBuiltInMultiSelectionListStrategy.UpdatePredefinitionDataForObject(ObjectCustomFieldId, data)) { if (DataUpdated != null) { ObjectCustomField objectCustomField = session.GetObjectByKey <ObjectCustomField>(ObjectCustomFieldId); //Raise DataUpdated event DataUpdated(this, new CustomFieldControlEventArgs( ObjectCustomFieldId, objectCustomField.ObjectTypeCustomFieldId.ObjectTypeCustomFieldId, objectCustomField.ObjectId.ObjectId, objectCustomField.ObjectTypeCustomFieldId.CustomFieldId.CustomFieldId, CustomFieldControlEventArgs.CustomFieldCategoryEnum.BUILT_IN, null, BasicCustomFieldTypeEnum.NONE, data, null)); } } } return(true); }
protected void Page_Load(object sender, EventArgs e) { if (NASCustomFieldTypeBuiltInMultiSelectionListStrategy != null) { NASCustomFieldTypeBuiltInMultiSelectionListStrategy.InitXpoDatasource(datasource); NASCustomFieldTypeBuiltInMultiSelectionListStrategy.InitGridLookup(grdlookupItemMenu); } }
public bool NASCustomFieldTypeBuiltInMultiSelectionListControlDataEditingState_CRUD() { List <NASCustomFieldPredefinitionData> data = NASCustomFieldTypeBuiltInMultiSelectionListStrategy.GetPredefinitionDataOfObject(ObjectCustomFieldId); grdlookupItemMenu.GridView.Selection.UnselectAll(); if (data != null) { foreach (var item in data) { grdlookupItemMenu.GridView.Selection.SetSelectionByKey(item.RefId, true); } } return(true); }