public virtual void CreateForm(SAPbouiCOM.Application SboApp, string strXml, SAPbobsCOM.Company cmp, string frmId) { formId = frmId; frmXml = strXml; oCompany = cmp; oApplication = SboApp; oApplication.ItemEvent += new _IApplicationEvents_ItemEventEventHandler(oApplication_ItemEvent); oApplication.RightClickEvent += new _IApplicationEvents_RightClickEventEventHandler(oApplication_RightClickEvent); oApplication.AppEvent += new _IApplicationEvents_AppEventEventHandler(oApplication_AppEvent); oApplication.MenuEvent += new _IApplicationEvents_MenuEventEventHandler(oApplication_MenuEvent); UDClass clsudo = Program.objHrmsUI; setFilter(); try { clsudo.AddXML(strXml); oForm = oApplication.Forms.Item(frmId); } catch (Exception ex) { try { oForm = oApplication.Forms.Item(frmId); oForm.Select(); } catch (Exception ex1) { oApplication.StatusBar.SetText(ex1.Message); } } oForm.EnableMenu("1282", true); // Add New Record oForm.EnableMenu("1288", true); // Next Record oForm.EnableMenu("1289", true); // Pevious Record oForm.EnableMenu("1290", true); // First Record oForm.EnableMenu("1291", true); // Last record oForm.EnableMenu("1281", true); // Find record string mnuId = frmId.Replace("frm", "mnu"); //isFormReadOnly(mnuId); }
public virtual void CreateForm(Application SboApp, SAPbobsCOM.Company cmp, string frmId) { formId = frmId; oCompany = cmp; oApplication = SboApp; oApplication.ItemEvent += new _IApplicationEvents_ItemEventEventHandler(oApplication_ItemEvent); oApplication.RightClickEvent += new _IApplicationEvents_RightClickEventEventHandler(oApplication_RightClickEvent); oApplication.AppEvent += new _IApplicationEvents_AppEventEventHandler(oApplication_AppEvent); oApplication.MenuEvent += new _IApplicationEvents_MenuEventEventHandler(oApplication_MenuEvent); UDClass clsudo = Program.objHrmsUI; setFilter(); oForm = oApplication.Forms.Item(frmId); string mnuId = frmId.Replace("frm_", ""); //isFormReadOnly(mnuId); }