在UIModel中增加单据类型的编号方式字段
将编号方式拖入界面并隐藏
在单据类型参照返回值绑定中将编号方式绑定到界面上的编号方式
接下来有两种方式关联单号文本框
1、通过使能关联控件
2、通过TextChange事件
private void DocumentType190_TextChanged_Extend(object sender, EventArgs e)
{
// 有ID的时候不需要判断了,不然会把单号的值覆盖
if (this.Model.PackingFiles.FocusedRecord?.ID > 0) {
DocumentType190_TextChanged_DefaultImpl(sender, e);
return;
}
if (this.Model.PackingFiles.FocusedRecord?.DocumentType_DocHeaderSequenceStyle == 0)
{
((IUIFieldBindingDataBindControl)this.DocNo134).ReadOnly = true;
this.DocNo134.Value = "自动编号";
}
else
{
((IUIFieldBindingDataBindControl)this.DocNo134).ReadOnly = false;
this.DocNo134.Value = "";
}
DocumentType190_TextChanged_DefaultImpl(sender, e);
}
评论 (0)