【笔记分享】锁定单据体某一行原创
4人赞赏了该文章
1,219次浏览
编辑于2021年04月07日 16:56:40
public static void LockEntityRow(IDynamicFormView formView, string entryKey, int row) { var entityCollection = formView.Model.DataObject[entryKey] as DynamicObjectCollection; if (entityCollection == null || entityCollection.Count == 0) return; foreach (var property in entityCollection[0].DynamicObjectType.Properties) { var propertyName = property.Name; if (propertyName.Contains("Id") || propertyName.Equals("Seq")) { continue; } formView.GetFieldEditor(propertyName, row).Enabled = false; } }
不知道有没有更好的方法。。
推荐阅读