简体   繁体   中英

how to copy an auto generated id number to a textbox?

im trying to figure out a way to copy the auto generated "BOM No" into another textbox "Schedule No", the problem is that the value of "BOM No:" when adding a new record is set to "New" and is only assigned a BOM number when saving the record.

I would like to find a method that would allow me to equal the value of BOM No to Schedule No so that i could use it as an identifier when loading BOM Records accodring to BOM No = Schedule No

Any help would be much appreciated :)

BOM 编号:= 自动生成的 ID

I would do something like this. Have a property on the form/window (whatever it is) and when the BOM number is set, that property should be set with the value of the BOM number.

Then, bind both TextBox controls (not sure whether you are using WPF or Winforms) to that property. Both technologies can do such bindings.

Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM