Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void FormLoad()
- {
- _formLoaded = false; // otherwise method gets called recursively for some reason
- try
- {
- if (_form.Mode == SAPbouiCOM.BoFormMode.fm_ADD_MODE)
- {
- string id = _form.UniqueID;
- //edit text to enter code, this line may throw COM exceptions about the cast, seemingly randomly
- SAPbouiCOM.BoFormItemTypes t = _form.Items.Item("5").Type;
- _ET_codeEntry = (SAPbouiCOM.EditText)(_form.Items.Item("5").Specific);
- _CoB_codeEntryMode = (SAPbouiCOM.ComboBox)(_form.Items.Item("1320002080").Specific);
- //get new code automatically
- newCode = NumberPool.GetNextNumber("BUSPARTNER");
- _ET_codeEntry.Value = newCode.ToString();
- //deactivate items
- _ET_codeEntry.Active = false;
- _form.Items.Item("5").Enabled = false;
- _form.Items.Item("1320002080").Enabled = false;
- _CoB_codeEntryMode.Active = false;
- _CoB_codeEntryMode.ValidValues.Add("0", "Automatisch");
- //_CoB_codeEntryMode.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index);
- //_CoB_codeEntryMode.Select("Automatisch", SAPbouiCOM.BoSearchKey.psk_ByDescription);
- }
- }
- catch (Exception ex)
- {
- _log.Add("FormLoad() exception: " + ex.Message);
- //WriteLog();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement