private void ItemLoad() { //1.¬Ýsample SubMain.AddChooseFromList(f17, "2", "cfl2", "CardType", "C"); SubMain.AddChooseFromList(f17, "17", "cfl17", "", ""); //define ds f17.DataSources.UserDataSources.Add("txCardCode", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); f17.DataSources.UserDataSources.Add("txEntry", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); f17.DataSources.UserDataSources.Add("txDate", SAPbouiCOM.BoDataType.dt_DATE, 254); //bind ds txCardCode.DataBind.SetBound(true, "", "txCardCode"); txEntry.DataBind.SetBound(true, "", "txEntry"); txDate.DataBind.SetBound(true, "", "txDate"); txCardCode.ChooseFromListUID = "cfl2"; txCardCode.ChooseFromListAlias = "CardCode"; txEntry.ChooseFromListUID = "cfl17"; txEntry.ChooseFromListAlias = "DocEntry"; oDTtmp.ExecuteQuery("select WhsCode,WhsName from owhs"); for (int i = 0; i < oDTtmp.Rows.Count; i++) { cbWH.ValidValues.Add(oDTtmp.GetValue(0, i).ToString(), oDTtmp.GetValue(1, i).ToString()); } // }
public Menu() { //************************************************************* // set SBO_Application with an initialized application object //************************************************************* //³s½u SetApplication(); //load menu SubMain.LoadXML("delmenu.xml"); //SubMain.LoadXML("addmenu.xml"); //SubMain.LoadXML("addmenu.xml"); //¥ý±¾,¥ý¶] SubMain.SBO_Application.MenuEvent += new SAPbouiCOM._IApplicationEvents_MenuEventEventHandler(SBO_MenuEvent); SubMain.SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_ItemEvent); SubMain.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_AppEvent); //fdoc fdoc = new fdoc(); select f17 = new select(); //f22 f1 = new f22(); //f2 f2 = new f2(); //f2 f2222 = new f2(); //s22 f22 = new s22(); //frm2 f3 = new frm2(); //fdoc f4 = new fdoc(); //s17 f5 = new s17(); }
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); }
public void SBO_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; //cfl SubMain.GetCFL_EDIT(FormUID, ref pVal, out BubbleEvent, "txCardCode", "cfl2"); SubMain.GetCFL_EDIT(FormUID, ref pVal, out BubbleEvent, "txEntry", "cfl17"); if (pVal.Before_Action == false) { return; } try { if (FormUID == FUID) { if (pVal.ItemUID == "10") { if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) { try { f17.Freeze(true); string cmd = GetCmd(); oDT.ExecuteQuery(cmd); InitGridCol(); } catch (Exception ex) { } finally { f17.Freeze(false); } } } } } catch (Exception ex) { SubMain.SBO_Application.MessageBox(ex.Message, 1, "Ok", "", ""); } }
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); } }
public f2() { SubMain.LoadXML("f2.xml"); }
private void InitGridCol() { SubMain.SetGridLinkCol(G1, "DocEntry", "17"); SubMain.SetGridLinkCol(G1, "ItemCode", "4"); }
public fdoc() { SubMain.LoadXML("doc.xml"); }