public override void etAfterKeyDown(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterKeyDown(ref pVal, ref BubbleEvent); if (pVal.ItemUID == txSAtt.Item.UniqueID) { ApplySearch(); } }
private void FTCW_AfterAddBtnPressed(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; __Form = __app.Forms.GetForm(pVal.FormTypeEx, pVal.FormTypeCount); oMatrix = __Form.Items.Item("Item_1").Specific; oMatrix.AutoResizeColumns(); }
public override void etAfterCmbSelect(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterCmbSelect(ref pVal, ref BubbleEvent); if (pVal.ItemUID == cbLOV.Item.UniqueID) { hideValues(); } }
private void SalesQuoteFormHandler(SAPbouiCOM.Form form, SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_FORM_LOAD: AddTab(form, paneCCLog, "Credit Card Log", "114"); AddCCLogMatrix(form, paneCCLog); FormSetup(form); theActiveForm = form; break; case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED: break; } } else { //errorLog(pVal.EventType.ToString()); switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_FORM_DEACTIVATE: case SAPbouiCOM.BoEventTypes.et_LOST_FOCUS: break; case SAPbouiCOM.BoEventTypes.et_FORM_LOAD: break; case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT: break; case SAPbouiCOM.BoEventTypes.et_CLICK: if (pVal.ItemUID == mxtCCLog) { HandleCCLogSelect(form); } break; case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED: HandleSQPress(form, pVal); break; } } } catch (Exception ex) { errorLog(ex); } }
/// <summary> /// SBO_Application_ItemEvent /// Metodo para controlar los eventos de la pantalla. /// @Author FranciscoFimbres /// </summary> /// <param name="FormUID"></param> /// <param name="pVal"></param> /// <param name="BubbleEvent"></param> private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; //string y = pVal.CharPressed.ToString(); try { if (FormUID.Equals(this.UIAPIRawForm.UniqueID)) { if (!pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_CLICK: if (pVal.ItemUID.Equals("btnSelect")) { SelectContract(); } if (pVal.ItemUID.Equals("btnCancel")) { this.UIAPIRawForm.Close(); } break; case SAPbouiCOM.BoEventTypes.et_FORM_CLOSE: UnLoadEvents(); break; } } else if (pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_CLICK: if (pVal.ItemUID.Equals("mtxOV")) { if (pVal.Row > 0) { mtxOrdersSale.SelectRow(pVal.Row, true, false); } } break; case SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK: if (pVal.ItemUID.Equals("mtxOV")) { SelectContract(); } break; } } } } catch (Exception ex) { LogUtility.WriteError(String.Format("[frmCFLOrdersSale - SBO_Application_ItemEvent] Error: {0}", ex.Message)); SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(ex.Message); } }
/// <Events> /// Eventos de Form1 /// </summary> /// <param name="FormUID"></param> /// <param name="pVal"></param> /// <param name="BubbleEvent"></param> private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (FormUID.Equals(this.UIAPIRawForm.UniqueID)) { if (!pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_CLICK: if (pVal.ItemUID.Equals("btnSearch")) { LoadMatrix(); } if (pVal.ItemUID.Equals("btnPaymR")) { int lIntSelectedRow = mObjSMatrix.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_RowOrder); if (lIntSelectedRow > 0) { string lStrBP = (string)this.UIAPIRawForm.DataSources.DataTables.Item("DM_CC").Columns.Item("U_SellerCode").Cells.Item(lIntSelectedRow - 1).Value; string lStrAuctNum = mObjCbAuct.Value; OutgoingPayments(lStrBP, lStrAuctNum); } else { string lStrMessage = Enums.MessagesEnum.WarningMessages.SIN_REGISTRO.GetDescription(); Messages(lStrMessage, SAPbouiCOM.BoStatusBarMessageType.smt_Error); LogUtility.WriteInfo("SIN REGISTRO SeELECCIONADO"); } } if (pVal.ItemUID.Equals("btnSave")) { ListSeletAutorizations(); } break; case SAPbouiCOM.BoEventTypes.et_FORM_CLOSE: UnLoadEvents(); break; } } } } catch (Exception lObjException) { //LogUtility.WriteError("DI API: " + DIApplication.Company.GetLastErrorDescription()); LogUtility.WriteError("EXCEPCION: " + lObjException.Message); Messages(lObjException.Message, SAPbouiCOM.BoStatusBarMessageType.smt_Error); //Application.SBO_Application.StatusBar.SetText(lObjException.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); } }
public override void etAfterValidate(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterValidate(ref pVal, ref BubbleEvent); if (pVal.ItemUID == mtDC.Item.UniqueID && pVal.Row > 0 && pVal.ColUID == "cCostCode") { mtDC.FlushToDataSource(); addEmptyRow(mtDC, BOQD, "CostCode"); } }
public override void etAfterKeyDown(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterKeyDown(ref pVal, ref BubbleEvent); if (pVal.CharPressed == 13 && pVal.ItemUID == txGrpName.Item.UniqueID) { addCode(); txGrpName.Value = ""; } }
private void PaymentMeansFormHandler(SAPbouiCOM.Form form, SAPbouiCOM.ItemEvent pVal) { try { if (pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_FORM_LOAD: PMCustID = getCustomerID(); if (PMCustID == "") { SBO_Application.MessageBox("Please select a customer first"); form.Visible = false; return; } AddTab(form, panePM, "eBizCharge", "5"); AddCCPMFormField(form, paneBP); form.Items.Item("5").Visible = false; reload(form, PMCustID, ref PMCustList, ref PMSAPCust); break; } } else { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_FORM_LOAD: currentForm = form; tProcess = new Thread(ThreadProc); tProcess.Start(); break; case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT: { switch (pVal.ItemUID) { case cbPaymentMethod: PMSAPCust = getCCInfoSelect(form, PMCustList); populateCCInfo(form, PMSAPCust); break; } } break; case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED: handlePMItemPress(form, pVal); break; } } }catch (Exception ex) { errorLog(ex); } }
public static void SolicitudCompra_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool bBubbleEvent) { bBubbleEvent = true; try { switch (pVal.BeforeAction) { case true: break; case false: if ((pVal.EventType == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) && (pVal.ItemUID == "10000329")) { if (oCompany == null) { Funciones.Connect_Application(ref oCompany); } oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item(pVal.ItemUID).Specific; businessObject = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset); oItems = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems); int nOrden = 0; int nDocOrd = 0; string sSerie = ""; //string sql = ""; //string itemCode = ""; try { if (oComboBox.Selected.Description == "0") { //Obtener DocEntry de Solicitud de Compra oDBDataSource = oForm.DataSources.DBDataSources.Item("OPRQ"); nOrden = Convert.ToInt32(oDBDataSource.GetValue("DocNum", oDBDataSource.Offset)); //Convert.ToInt32(oEdit.Value); nDocOrd = Convert.ToInt32(oDBDataSource.GetValue("DocEntry", oDBDataSource.Offset)); oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("88").Specific; sSerie = oComboBox.Selected.Description; System.Runtime.InteropServices.Marshal.ReleaseComObject(businessObject); //Abrir Pantalla de Salida de Inventario y agregar lineas de acuerdo a Solicitud try { Application.SBO_Application.ActivateMenuItem("3079"); oForm = Application.SBO_Application.Forms.ActiveForm; SalidaMercancias.Agregar_Items_Desde_Solicitud_Interna(nDocOrd, nOrden, sSerie); } catch (Exception) { } } } catch (Exception) { } } break; } } catch (Exception) { } }
/// <summary> /// Interviene los eventos de los item del form. /// </summary> public static void m_SBO_Appl_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; SAPbouiCOM.Form oForm = Conexion_SBO.m_SBO_Appl.Forms.Item(FormUID); ResultMessage rslt = new ResultMessage(); try { if (pVal.BeforeAction && pVal.EventType.Equals(SAPbouiCOM.BoEventTypes.et_CLICK) && pVal.ItemUID.Equals("bt_chk")) { EjecutarChecking(oForm); } if (pVal.BeforeAction && pVal.EventType.Equals(SAPbouiCOM.BoEventTypes.et_CLICK) && pVal.ItemUID.Equals("bt_SLR")) { //AsignadosHec.ListaAsignacionHec.Clear(); oForm.Close(); } if (pVal.BeforeAction && pVal.EventType.Equals(SAPbouiCOM.BoEventTypes.et_CLICK) && pVal.ItemUID.Equals("bt_ASG")) { rslt = ValidarDatosAsignados(oForm); if (rslt.Success) { //rslt = AsignarDatos(oForm); if (rslt.Success) { oForm.Close(); Conexion_SBO.m_SBO_Appl.StatusBar.SetText(rslt.Mensaje, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); } else { BubbleEvent = false; Conexion_SBO.m_SBO_Appl.StatusBar.SetText(rslt.Mensaje, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); } } else { BubbleEvent = false; Conexion_SBO.m_SBO_Appl.StatusBar.SetText(rslt.Mensaje, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); } } if (pVal.BeforeAction && pVal.EventType.Equals(SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) && pVal.ItemUID.Equals("matrixVar") && pVal.ColUID.Equals("co_Chk")) { DataBindCuarteles(oForm); } if (pVal.BeforeAction && pVal.EventType.Equals(SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) && pVal.ItemUID.Equals("matrixCrt") && pVal.ColUID.Equals("co_Chk")) { SetButtonCheckCuarteles(oForm); } } catch (Exception ex) { Msj_Appl.Errores(14, "m_SBO_Appl_ItemEvent() > SEI_FormINGMH.cs " + ex.Message); Conexion_SBO.m_SBO_Appl.StatusBar.SetText("m_SBO_Appl_ItemEvent() > SEI_FormINGMH.cs " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); } }
public override void etAfterClick(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterClick(ref pVal, ref BubbleEvent); if (pVal.ItemUID.Contains("mt")) { try { if (chSO.Checked) { oForm.Settings.MatrixUID = pVal.ItemUID; oForm.Settings.Enabled = true; } } catch { } } if (pVal.ItemUID == "1") { } if (pVal.ItemUID == "43") { RefreshForm(); } if (pVal.ItemUID == "btCreate") { oApplication.MessageBox("Creating Sp "); createProductionOrder(); RefreshForm(); } if (pVal.ItemUID == "34") { int poResult = createTypePurchaseOrder(); if (poResult != 0) { int createProduction = oApplication.MessageBox("PO not created for a supplier. Do you still want to add production order?(Y/N)", 2, "Yes", "No"); if (createProduction == 2) { return; } } createTypeProductionOrder(); // createSPProductionOrder(); // createProductionOrder(); dtHead.SetValue("TodayQty", 0, "0"); fillAnimals(); getReport(); fillPO(); oApplication.StatusBar.SetText("Operation Completed Successfully!", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); } if (pVal.ItemUID == "btCalcT") { CalcToday(); } }
public override void etAfterCmbSelect(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterCmbSelect(ref pVal, ref BubbleEvent); if (pVal.ItemUID == cbBU.Item.UniqueID) { updateRDBaseUnitVal(); oForm.Items.Item("btUpd").Visible = false; // oForm.Items.Item("btUpd").Enabled =true; } }
public bool HandleItemEvents(SAPbouiCOM.ItemEvent itemEvent) { var result = true; try { if (itemEvent.BeforeAction) { if (itemEvent.ItemUID.Equals(MATRIZ_PRINCIPAL) && itemEvent.Row >= 0) { if (!string.IsNullOrEmpty(oMatrix.DataTable.GetValue("Code", itemEvent.Row))) { edtCodigo.Value = oMatrix.DataTable.GetValue("Code", itemEvent.Row).ToString().Trim(); edtDescripcion.Value = oMatrix.DataTable.GetValue("Name", itemEvent.Row).ToString().Trim(); } } else { switch (mForm.Items.Item(itemEvent.ItemUID).Type) { case SAPbouiCOM.BoFormItemTypes.it_BUTTON: switch (itemEvent.ItemUID) { case BTN_ADD: RegistrarObjetos(); break; case BTN_UPD: ActualizarObjetos(); break; case BTN_DEL: EliminarObjetos(); break; case BTN_LIMPIAR: iniciarValoresPorDefecto(); break; default: break; } break; } } } } catch (Exception ex) { result = false; StatusMessageError("HandleItemEvents() > " + ex.Message); } return(result); }
public override void etAfterClick(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterClick(ref pVal, ref BubbleEvent); if (pVal.ItemUID == "1") { update(); } if (pVal.ItemUID == cmdDR.Item.UniqueID) { int selRow = mtSelRow(mtDC); if (selRow > 0) { double ActVal = Convert.ToDouble(((SAPbouiCOM.EditText)mtDC.GetCellSpecific("V_2", selRow)).Value); string costingCode = Convert.ToString(((SAPbouiCOM.EditText)mtDC.GetCellSpecific("cCostCode", selRow)).Value); if (ActVal > 0) { oApplication.MessageBox("You can not delete already consumed costing code"); return; } else { deleteRow(costingCode); fillDetails(BOQH.GetValue("ItemCode", 0).ToString()); addEmptyRow(mtDC, BOQD, "CostCode"); } } } if (pVal.ItemUID == "btAdd") { if (txACode.Value == "" || txAName.Value == "") { } else { SAPbobsCOM.GeneralService oGeneralService; SAPbobsCOM.GeneralData oGeneralData; SAPbobsCOM.CompanyService cmpserv = oCompany.GetCompanyService(); oGeneralService = cmpserv.GetGeneralService("oIBOQ"); oGeneralData = (SAPbobsCOM.GeneralData)oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralData); oGeneralData.SetProperty("Code", txACode.Value.ToString()); oGeneralData.SetProperty("Name", txAName.Value.ToString()); oGeneralService.Add(oGeneralData); txACode.Value = ""; txAName.Value = ""; } } }
/// <summary> /// Metodo encargado de gestionar los eventos generado por los Items del sistema /// </summary> /// <param name="FormUID">Identificador del formulario</param> /// <param name="pVal">Objeto con el listado completo de variables de control del evento</param> /// <param name="BubbleEvent">Indicador booleano para detener la cola de eventos generada</param> void m_SBO_Appl_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { switch (pVal.FormTypeEx) { case "SEI_INT": SEI_FormIntegracion.m_SBO_Appl_ItemEvent(FormUID, ref pVal, out BubbleEvent); break; case "FormDocS": SEI_FormDocS.m_SBO_Appl_ItemEvent(FormUID, ref pVal, out BubbleEvent); break; case "FormDocSMas": SEI_FormDocSMas.m_SBO_Appl_ItemEvent(FormUID, ref pVal, out BubbleEvent); break; case "SET_VAL": SEI_FormSetVal.ItemEventEventHandler(FormUID, ref pVal, out BubbleEvent); break; /* * case "SEI_INTC": * SEI_FormIntegracionContado.m_SBO_Appl_ItemEvent(FormUID, ref pVal, out BubbleEvent); * break; * case "SEI_DAT": * SEI_FormDat.m_SBO_Appl_ItemEvent(FormUID, ref pVal, out BubbleEvent); * break; * case "SEI_ERR": * SEI_FormErr.m_SBO_Appl_ItemEvent(FormUID, ref pVal, out BubbleEvent); * break; */ /*case "SEI_NREC": * SEI_FormNrec.m_SBO_Appl_ItemEvent(FormUID, ref pVal, out BubbleEvent); * break; * * case "SEI_MERC": * SEI_FormMerc.m_SBO_Appl_ItemEvent(FormUID, ref pVal, out BubbleEvent); * break;*/ } } catch (Exception ex) { Msj_Appl.Errores(14, "m_SBO_Appl_ItemEvent() > Eventos_SBO.cs" + ex.Message + pVal.EventType.ToString()); } finally { GC.Collect(); } }
public bool HandleItemEvents(SAPbouiCOM.ItemEvent itemEvent) { var res = true; try { if (itemEvent.EventType == SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED && itemEvent.ItemUID.Equals(GRID_PRINCIPAL)) { string messageColumn = mGrid.DataTable.GetValue("Mensaje", itemEvent.Row); if (itemEvent.BeforeAction) { if (messageColumn != null && !messageColumn.Trim().Equals("")) { if (messageColumn.Trim().ToUpper().Contains("BORRADOR")) { ((SAPbouiCOM.EditTextColumn)mGrid.Columns.Item(16)).LinkedObjectType = Constantes.OBJ_TYPE_DRAFTS; } } else { res = false; } } else { ((SAPbouiCOM.EditTextColumn)mGrid.Columns.Item(16)).LinkedObjectType = Constantes.OBJ_TYPE_DEVOLUCION; } } else { switch (itemEvent.ItemUID) { case BTN_REFRESCAR: if (itemEvent.BeforeAction) { iniciarValoresPorDefecto(); } break; default: break; } } } catch (Exception e) { res = false; StatusMessageError("HandleItemEvents() > " + e.Message); } return(res); }
public static void m_SBO_Appl_ItemEvent(String FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; SAPbouiCOM.Form oForm = null; try { if (!pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST: oForm = Conexion_SBO.m_SBO_Appl.Forms.Item(FormUID); GestionarSeleccionCFL(oForm, pVal); break; case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED: oForm = Conexion_SBO.m_SBO_Appl.Forms.Item(FormUID); if (pVal.ItemUID.Equals("Item_15")) { Descripcion = oForm.Items.Item("Item_1").Specific.Value.ToString(); Cuenta = oForm.Items.Item("Item_3").Specific.Value.ToString(); Dim1 = oForm.Items.Item("Item_6").Specific.Value.ToString(); Dim2 = oForm.Items.Item("Item_8").Specific.Value.ToString(); Dim3 = oForm.Items.Item("Item_10").Specific.Value.ToString(); Dim4 = oForm.Items.Item("Item_12").Specific.Value.ToString(); Dim5 = oForm.Items.Item("Item_14").Specific.Value.ToString(); IntegracionServicio(); oForm.Close(); } if (pVal.ItemUID.Equals("Item_16")) { oForm.Close(); } break; default: break; } } } catch (Exception ex) { Conexion_SBO.m_SBO_Appl.StatusBar.SetText("Error: " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Long, SAPbouiCOM.BoStatusBarMessageType.smt_Error); } finally { FuncionesComunes.LiberarObjetoGenerico(oForm); } }
public override void etAfterCmbSelect(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterCmbSelect(ref pVal, ref BubbleEvent); if (pVal.ItemUID == cbAT.Item.UniqueID) { RefreshForm(); } if (pVal.ItemUID == cbAC.Item.UniqueID) { fillAT(cbAC.Selected.Value.ToString()); } }
private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; //string y = pVal.CharPressed.ToString(); try { if (FormUID.Equals(this.UIAPIRawForm.UniqueID)) { if (!pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_CLICK: if (pVal.ItemUID.Equals("btnCreV")) { DoPayment(); } break; case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST: ChooseFromListAfterEvent(pVal); break; case SAPbouiCOM.BoEventTypes.et_LOST_FOCUS: if (pVal.ItemUID.Equals("mtxCont")) { if (pVal.ColUID.Equals("ColHPH") || pVal.ColUID.Equals("ColPrice")) { //CalculateLineTotal(pVal.Row); } } break; case SAPbouiCOM.BoEventTypes.et_FORM_LOAD: break; case SAPbouiCOM.BoEventTypes.et_FORM_CLOSE: UnLoadEvents(); break; } } } } catch (Exception ex) { LogUtility.WriteError(string.Format("[frmTravelExpenses - SBO_Application_ItemEvent] Error: {0}", ex.Message)); if (!ex.Message.Contains("Form - Invalid Form")) { SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(ex.Message); } } }
static void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if ((pVal.FormTypeEx != null) && (pVal.FormTypeEx == "TransferenciasBancarias.Capa_Presentacion.PagosTransf")) { TransferenciasBancarias.Capa_Presentacion.PagosTransf.Transferencias_ItemEvent(FormUID, ref pVal, out BubbleEvent); } } catch (Exception) {} }
public override void etAfterCmbSelect(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterCmbSelect(ref pVal, ref BubbleEvent); if (pVal.ItemUID == btAdd.Item.UniqueID) { // changeStatus(); // fillReport(); btAdd.Caption = "Add New Code"; ini_controls(); oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE; } }
public override void etAfterValidate(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterValidate(ref pVal, ref BubbleEvent); if (pVal.ItemUID == "29") { RefreshForm(); } if (pVal.ItemUID == "txDD") { RefreshForm(); } }
private void OApplication_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; if (bModal & FormUID != "Modal1") { oForm.Select(); // Select the modal form BubbleEvent = false; } else if (FormUID == "Modal1" & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_CLOSE) & bModal) { bModal = false; } }
private void FormClose(string FormUID, SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { BubbleEvent = true; if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_CLOSE) { SBO_Application.ItemEvent -= new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_Application_ItemEvent); oForm = null; oCompany = null; SBO_Application = null; oSAP = null; } }
/* * private void OpenFileDialogFilterAndTitle(string pStrBanking, System.Windows.Forms.OpenFileDialog pBoxDialog) * { * switch (pStrBanking) * { * case "BANAMEX": * pBoxDialog.Filter = "Text Files|*.txt"; * pBoxDialog.Title = "Selecciona el archivo de Banamex"; * break; * case "BANCOMER": * pBoxDialog.Filter = "Text Files|*.xlsx"; * pBoxDialog.Title = "Selecciona el archivo de Bancomer"; * break; * case "BANORTE": * pBoxDialog.Filter = "Text Files|*.txt"; * pBoxDialog.Title = "Selecciona el archivo de Banorte"; * break; * case "SANTANDER": * pBoxDialog.Filter = "Text Files|*.csv"; * pBoxDialog.Title = "Selecciona el archivo de Santander"; * break; * case "SCOTIABANK": * pBoxDialog.Filter = "Text Files|*.txt"; * pBoxDialog.Title = "Selecciona el archivo de ScotiaBank"; * break; * } * } */ private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (pVal.FormType == 385 && pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD && pVal.Before_Action) { SAPbouiCOM.Item lItmLblBanco = null; SAPbouiCOM.Item lItmBtnImportar = null; SAPbouiCOM.Item lItmCmbBanco = null; mObjForm = Application.SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount); if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD && pVal.Before_Action) { lItmLblBanco = mObjForm.Items.Add("lblBanco", SAPbouiCOM.BoFormItemTypes.it_STATIC); //Item("lblBanco"); lItmBtnImportar = mObjForm.Items.Add("btnImpo", SAPbouiCOM.BoFormItemTypes.it_BUTTON); lItmCmbBanco = mObjForm.Items.Add("cmbBanco", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); //lItmCmbBanco.Top = mObjForm.Items.Item("540002004").Top; //lItmCmbBanco.Left = mObjForm.Items.Item("540002004").Left + 45; lItmLblBanco.Top = mObjForm.Items.Item("6").Top; lItmLblBanco.Left = mObjForm.Items.Item("6").Left + 40; lItmCmbBanco.Top = lItmLblBanco.Top + 15; lItmCmbBanco.Left = lItmLblBanco.Left; //lItmLblBanco.Top = lItmCmbBanco.Top -15; //lItmLblBanco.Left = lItmCmbBanco.Left - 25; (lItmLblBanco.Specific as SAPbouiCOM.StaticText).Caption = "Nombre Banco:"; lItmBtnImportar.Top = lItmCmbBanco.Top; lItmBtnImportar.Left = lItmCmbBanco.Left + lItmCmbBanco.Width + 1; (lItmBtnImportar.Specific as SAPbouiCOM.Button).Caption = "Importar"; (lItmCmbBanco.Specific as SAPbouiCOM.ComboBox).ValidValues.Add("SELECCIONE", "SELECCIONE"); (lItmCmbBanco.Specific as SAPbouiCOM.ComboBox).ValidValues.Add("BANAMEX", "BANAMEX"); (lItmCmbBanco.Specific as SAPbouiCOM.ComboBox).ValidValues.Add("BANCOMER", "BANCOMER"); (lItmCmbBanco.Specific as SAPbouiCOM.ComboBox).ValidValues.Add("BANORTE", "BANORTE"); (lItmCmbBanco.Specific as SAPbouiCOM.ComboBox).ValidValues.Add("SANTANDER", "SANTANDER"); (lItmCmbBanco.Specific as SAPbouiCOM.ComboBox).ValidValues.Add("SCOTIABANK", "SCOTIABANK"); (lItmCmbBanco.Specific as SAPbouiCOM.ComboBox).Select("SELECCIONE"); lItmCmbBanco.DisplayDesc = false; } } } catch (Exception ex) { Application.SBO_Application.MessageBox(ex.Message); } }
private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (FormUID.Equals(this.UIAPIRawForm.UniqueID)) { if (!pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_CLICK: if (pVal.ItemUID.Equals("btnSearch")) { SearchSellers(); } else if (pVal.ItemUID.Equals("btnSend")) { if (CheckValidMails()) { SendMails(); } } break; case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED: if (pVal.ItemUID.Equals("chk_All")) { SelectAllSellers(); } break; case SAPbouiCOM.BoEventTypes.et_LOST_FOCUS: if (pVal.ColUID.Equals("Mail")) { ValidMail(pVal.Row); } break; case SAPbouiCOM.BoEventTypes.et_FORM_CLOSE: UnLoadEvents(); break; } } } } catch (Exception ex) { SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(string.Format("ItemEventException: {0}", ex.Message)); } }
private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; if (!FormUID.Equals(this.UIAPIRawForm.UniqueID)) { return; } try { if (!pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_CLICK: if (pVal.ItemUID == mBtnSearch.Item.UniqueID) { SearchChecks(); } if (pVal.ItemUID == mBtnSave.Item.UniqueID) { SaveChecks(); } break; case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED: if (pVal.ItemUID == mMtxChecks.Item.UniqueID && pVal.ColUID == "C_Selected") { if (pVal.Row > mMtxChecks.RowCount) { return; } this.FlushValueToSource(mMtxChecks, pVal.ColUID, pVal.Row); } break; case SAPbouiCOM.BoEventTypes.et_FORM_CLOSE: UnloadEvents(); break; } } else { } } catch (Exception lObjException) { LogUtility.WriteError(string.Format("[BouncedChecks - SBO_Application_ItemEvent] Error: {0}", lObjException.Message)); UIApplication.ShowMessageBox(lObjException.Message); } }
private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (!FormUID.Equals(this.UIAPIRawForm.UniqueID)) { return; } if (!pVal.BeforeAction) { switch (pVal.EventType) { case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT: // Selected Bank on ComboBox if (pVal.ItemUID.Equals(mCmbBank.Item.UniqueID)) { LoadAccounts(); } // Selected Bank Account on ComboBox if (pVal.ItemUID.Equals(mCmbAcct.Item.UniqueID)) { ValidateFields(); } break; case SAPbouiCOM.BoEventTypes.et_CLICK: // Clicked Generate Button if (pVal.ItemUID.Equals(mBtnGenerate.Item.UniqueID) && mBtnGenerate.Item.Enabled) { GeneratePayments(); } if (pVal.ItemUID.Equals(lObjBtnCC.Item.UniqueID) && lObjBtnCC.Item.Enabled) { ReOpenCC(); } break; case SAPbouiCOM.BoEventTypes.et_FORM_CLOSE: UnLoadEvents(); break; } } } catch (Exception ex) { LogUtility.WriteError(string.Format("[CheckGeneration - SBO_Application_ItemEvent] Error: {0}", ex.Message)); SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(string.Format("ItemEventException: {0}", ex.Message)); } }
public override void etAfterCmbSelect(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etAfterCmbSelect(ref pVal, ref BubbleEvent); if (pVal.ItemUID == cbPL.Item.UniqueID && !initiallizing) { fillReport(); } if (pVal.ItemUID == btAct.Item.UniqueID) { changeStatus(); fillReport(); btAct.Caption = "Change To"; } if (pVal.ItemUID == btPL.Item.UniqueID) { assignPL(); fillReport(); btPL.Caption = "Assign to Production Line"; } if (pVal.ItemUID == mtReport.Item.UniqueID) { if (pVal.ColUID == "cProdLine" || pVal.ColUID == "cLabel" || pVal.ColUID == "cFT") { mtReport.FlushToDataSource(); int selRowIndex = pVal.Row - 1; if (selRowIndex >= 0) { string DocEntry = Convert.ToString(dtRpt.GetValue("DocEntry", selRowIndex)); string ProductionLine = Convert.ToString(dtRpt.GetValue("ProdLine", selRowIndex)); string Label = Convert.ToString(dtRpt.GetValue("Label", selRowIndex)); SAPbobsCOM.ProductionOrders prodOrder = (SAPbobsCOM.ProductionOrders)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders); prodOrder.GetByKey(Convert.ToInt32(DocEntry)); prodOrder.UserFields.Fields.Item("U_PMX_PLCD").Value = ProductionLine; prodOrder.UserFields.Fields.Item("U_B1_Label").Value = Label; int result = prodOrder.Update(); if (result != 0) { int errorCode = 0; string errmsg = ""; oCompany.GetLastError(out errorCode, out errmsg); oApplication.MessageBox(errmsg); } } } } }