public s17() { try { SubMain.LoadXML("17.xml"); } catch (Exception ex) { SubMain.MessageBox(ex.Message); } }
public f17c() { try { SubMain.SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_ItemEvent); SubMain.LoadXML("f17.xml"); GetControl(); ItemLoad(); } catch (Exception ex) { SubMain.MessageBox(ex.Message); } }
public static string GetCFL_value(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent, string ItemUID, string CFLID) { string ret = ""; BubbleEvent = true; if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST) { SAPbouiCOM.IChooseFromListEvent oCFLEvento = null; oCFLEvento = ((SAPbouiCOM.IChooseFromListEvent)(pVal)); string sCFL_ID = null; sCFL_ID = oCFLEvento.ChooseFromListUID; SAPbouiCOM.Form oForm = null; oForm = SBO_Application.Forms.Item(FormUID); SAPbouiCOM.ChooseFromList oCFL = null; oCFL = oForm.ChooseFromLists.Item(sCFL_ID); if (oCFLEvento.BeforeAction == false) { SAPbouiCOM.DataTable oDataTable = null; oDataTable = oCFLEvento.SelectedObjects; string val = null; try { val = System.Convert.ToString(oDataTable.GetValue(0, 0)); } catch (Exception ex) { } try { if (pVal.ItemUID == ItemUID) { ret = val; } } catch (Exception ex) { SubMain.MessageBox(ex.Message); } } } if ((FormUID == CFLID) & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD)) { System.Windows.Forms.Application.Exit(); } return(ret); }
private void SBO_ItemEvnt(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { GetCFL_EDIT(FormUID, ref pVal, out BubbleEvent, "CardCode", "2"); //f.item(UID);;f.item.col.row GetCFL_M1_EDIT(FormUID, ref pVal, out BubbleEvent, "m1", "4"); if (pVal.Before_Action == false) { if (pVal.ItemUID == "del") { if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) { int i = m1.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_RowOrder); if (i > 0) { m1.DeleteRow(i); } else { SubMain.MessageBox("½Ð¿ï¨ú"); } } } else if (pVal.ItemUID == "add") { if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) { //http://scn.sap.com/thread/23469 //f.DataSources.DataTables.Item("RDR1").Rows.Add(1); //m1.AddRow(1,m1.RowCount); //f.DataSources.DBDataSources.Item(1).Clear(); m1.AddRow(1, m1.RowCount); //((SAPbouiCOM.EditText)m1.Columns.Item(1).Cells.Item(1).Specific).Value = "0003013021000"; } } } } catch (Exception ex) { SubMain.MessageBox(ex.Message); } }
public static void LoadXML(string fileName) { //@"e:\bp.srf" try { XmlDocument oDoc = new XmlDocument(); string path = Application.StartupPath; path = System.IO.Path.Combine(path, "XML_Init"); path = System.IO.Path.Combine(path, fileName); oDoc.Load(path); string tmp = oDoc.InnerXml; SubMain.SBO_Application.LoadBatchActions(ref tmp); path = SBO_Application.GetLastBatchResults(); } catch (Exception ex) { SubMain.MessageBox(ex.Message); } }