private void btnFinish_ClickAfter(object sboObject, SBOItemEventArg pVal) { string lStrMessage = mLstJournalEntryDTO.Count() > 0 ? " Aun tiene registros por guardar " : ""; Auction lObjAuction = mObjPaymentServiceFactory.GetPaymentService().GetAuction(mStrAuctionId); if (!lObjAuction.AutAuction) { if (UIApplication.ShowOptionBox(lStrMessage + "¿Desea terminar cobro? ") == 1) { lObjAuction.AutAuction = true; int lIntResult = mObjPaymentServiceFactory.GetAuctionService().Update(lObjAuction); if (lIntResult == 0)//&& lObjAuction.AutCorral && lObjAuction.AutTransp) { List <MessageDTO> lLstMessagesDTO = mObjPaymentServiceFactory.GetPaymentService().GetMessages(mStrAuctionId); bool lBolAlert = false; foreach (MessageDTO lObjMessage in lLstMessagesDTO) { if (mObjPaymentServiceFactory.GetAlertService().SaveAlert(lObjMessage)) { lBolAlert = true; } } if (lBolAlert) { UIApplication.ShowMessageBox("Proceso terminado \n Se envió una alerta al departamento de crédito y cobranza"); } } } } else { UIApplication.ShowMessageBox("Proceso ya se ha terminado anteriormente"); } }
protected internal virtual void OnFormVisibleAfter(SBOItemEventArg pVal) { if (this.VisibleAfter != null) { this.VisibleAfter(pVal); } }
private void btnSeacrh_ClickAfter(object sboObject, SBOItemEventArg pVal) { try { if (mObjPaymentServiceFactory.GetPaymentService().ExistConfiguration("SU_DEUDORA") && mObjPaymentServiceFactory.GetPaymentService().ExistConfiguration("SU_ACREEDORA")) { List <PaymentDTO> lLstPaymentDTO = mObjPaymentServiceFactory.GetPaymentService().GetPayments(txtAuction.Value, mIntSignature).ToList(); if (lLstPaymentDTO.Count() > 0) { mStrAuctionId = txtAuction.Value; LogService.WriteInfo("Carga de subastas correctamente"); } else { UIApplication.ShowWarning("No se encontraron registros para esa subasta"); LogService.WriteInfo("No se encontraron registros para esa subasta"); } FillMatrix(lLstPaymentDTO); } else { UIApplication.ShowMessageBox("Los registros SU_DEUDORA o SU_ACREEDORA no existen en la tabla de configuración"); LogService.WriteInfo("Los registros SU_DEUDORA o SU_ACREEDORA no existen en la tabla de configuración"); } } catch (Exception ex) { UIApplication.ShowError("frmPayment (txtAuction_KeyDownAfter)" + ex.Message); LogService.WriteError("frmPayment (txtAuction_KeyDownAfter)" + ex.Message); LogService.WriteError(ex); } }
protected internal virtual void OnFormKeyDownAfter(SBOItemEventArg pVal) { if (this.KeyDownAfter != null) { this.KeyDownAfter(pVal); } }
protected internal virtual void OnFormClickAfter(SBOItemEventArg pVal) { if (this.ClickAfter != null) { this.ClickAfter(pVal); } }
protected internal virtual void OnFormDeactivateAfter(SBOItemEventArg pVal) { if (this.DeactivateAfter != null) { this.DeactivateAfter(pVal); } }
protected internal virtual void OnFormMenuHighlightAfter(SBOItemEventArg pVal) { if (this.MenuHighlightAfter != null) { this.MenuHighlightAfter(pVal); } }
//Btn OK private void Button3_PressedAfter(object sboObject, SBOItemEventArg pVal) { UIAPIRawForm.Freeze(true); var olcn = UIAPIRawForm.DataSources.DBDataSources.Item("@HTT_OLCN"); var documento = UIAPIRawForm.DataSources.DBDataSources.Item("@HTT_OLCN"); var recordset = (Recordset)CommonController.Company.GetBusinessObject(BoObjectTypes.BoRecordset); documento.SetValue("U_DocDate", documento.Offset, DateTime.Now.ToString("yyyyMMdd")); documento.SetValue("U_DocDueDate", documento.Offset, DateTime.Now.ToString("yyyyMMdd")); documento.SetValue("U_DocTaxDate", documento.Offset, DateTime.Now.ToString("yyyyMMdd")); var query = @"SELECT OBPL.BPLId, OBPL.BPLName, ORCT.VatRegNum from OBPL inner join ORCT on ORCT.BPLId = ORCT.DocEntry" ; recordset.DoQuery(query); cmbFilial.ExpandType = BoExpandType.et_DescriptionOnly; var query2 = @"select max(DocEntry) + 1 as DocEntry from [@HTT_OLCN]"; recordset.DoQuery(query2); documento.SetValue("U_BPLId", documento.Offset, cmbFilial.ValidValues.Item(0).Value); documento.SetValue("U_BPLName", documento.Offset, GetCnpjFilial(cmbFilial.ValidValues.Item(0).Value)); documento.SetValue("U_DocNum", documento.Offset, recordset.Fields.Item("DocEntry").Value.ToString()); mtItens.AutoResizeColumns(); UIAPIRawForm.Freeze(false); }
//Btn Imprimir private void Button2_PressedAfter(object sboObject, SBOItemEventArg pVal) { var olcn = UIAPIRawForm.DataSources.DBDataSources.Item("@HTT_OLCN"); var extract = olcn.GetValue("U_Extrato", olcn.Offset); DebtSettElementDeclaration.PrintReport(int.Parse(extract)); }
private void mtxCosts_ClickBefore(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (pVal.Row > 0) { mtxCosts.SelectRow(pVal.Row, true, false); mIntRowSelected = pVal.Row; decimal lIntRowPend = Convert.ToDecimal(DtMatrix.GetValue("C_SaldoPen", mIntRowSelected - 1).ToString()); int lIntRowStatus = Convert.ToInt32(DtMatrix.GetValue("C_Status", mIntRowSelected - 1).ToString()); if (lIntRowStatus == 4 && lIntRowPend < 0) { ShowControlsPayment(); } else { HiddecontrolsPayments(); } } } catch (Exception ex) { UIApplication.ShowError(ex.Message); LogService.WriteError("(mtxCosts_ClickBefore): " + ex.Message); LogService.WriteError(ex); } }
private void Button1_PressedAfter(object sboObject, SBOItemEventArg pVal) { CorrectionLogic logic = new CorrectionLogic(DiManager.Company); string transIdParam = EditText3.Value; string waitingTimeString = EditText4.Value; int waitingTime = int.Parse(waitingTimeString); if (!string.IsNullOrWhiteSpace(transIdParam)) { logic.CorrectionJournalEntriesSecondLogic(transIdParam, waitingTime); } else { int maxLine; int.TryParse(EditText2.Value, out maxLine); bool mustSkip = CheckBox0.Checked; string startDate = EditText0.Value; string endDate = EditText1.Value; CultureInfo provider = CultureInfo.InvariantCulture; logic.CorrectionJournalEntriesSecondLogic(new CorrectionJournalEntriesParams { MaxLine = maxLine, MustSkip = mustSkip, StartDate = DateTime.ParseExact(startDate, "yyyyMMdd", provider), EndDate = DateTime.ParseExact(endDate, "yyyyMMdd", provider), WaitingTimeInMinutes = waitingTime }); } }
private void ClickAfter_btnGuardar(object sboObject, SBOItemEventArg pVal) { Components.btnBuscar.Item.Enabled = false; try { string fecha = Components.txtFecha.Value; string query = string.Format("Select top 10 \"DocEntry\",\"CardCode\", \"DocTotal\", \"DocDate\" from \"OINV\" where \"DocDate\" = '{0}'", fecha); Components.dtFacturas.ExecuteQuery(query); Components.grdFacturas.DataTable = Components.dtFacturas; } catch (Exception ex) { AppContext .SBOApplication .StatusBar .SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); } finally { Components.btnBuscar.Item.Enabled = true; } }
private void mtx0_ClickAfter(object sboObject, SBOItemEventArg pVal) { try { if (!SelectRow(mtx0, pVal.Row)) { return; } string docNum = dt0.GetValue("C_Folio", selectedRow - 1).ToString(); string docEntry = pendingTransfers.Where(t => t.Folio == docNum).FirstOrDefault().DocEntry.ToString(); transferItems = foodTransferDAO.GetTransferItems(docEntry); Task.Factory.StartNew(() => { this.UIAPIRawForm.Freeze(true); SAPMatrix.Fill("DT1", dt1, mtx1, columns1.Keys.ToList(), transferItems); seriesNumbers = foodTransferDAO.GetSeriesNumbers(docEntry); this.UIAPIRawForm.Freeze(false); }); } catch (AggregateException ae) { ae.Handle(e => { SAPException.Handle(e, "mtx0_ClickAfter(AggregateException)"); return(true); }); } }
private void btnCancel_ClickBefore(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; this.UnLoadEvents(); this.UIAPIRawForm.Close(); }
private void btnInvoice_ClickBefore(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; if (!Validate()) { return; } switch (cbxType.Value) { case "Cobro Normal": Normal(); break; case "Cobro Cierre": CreateInvoice("N"); break; case "Facturación Subasta": CreateInvoice("S"); break; } }
protected virtual void fileButton_ClickAfter(object sboObject, SBOItemEventArg pVal) { SelectFileDialog dialog = new SelectFileDialog("C:\\", "", Messages.AdminModuleFilterPrefix + "|*.xml", DialogType.OPEN); dialog.Open(); modulePath.Value = dialog.SelectedFile; }
//Botão OK private void Button2_PressedAfter(object sboObject, SBOItemEventArg pVal) { UIAPIRawForm.Freeze(true); if (UIAPIRawForm.Mode != BoFormMode.fm_ADD_MODE) { return; } var recordset = (Recordset)CommonController.Company.GetBusinessObject(BoObjectTypes.BoRecordset); var dados = UIAPIRawForm.DataSources.DBDataSources.Item("@HTT_ONGN"); var dtMatriz = UIAPIRawForm.DataSources.DataTables.Item("dtMatriz"); var query = @"SELECT OBPL.BPLId, OBPL.BPLName, ORCT.VatRegNum from OBPL inner join ORCT on ORCT.BPLId = ORCT.DocEntry" ; recordset.DoQuery(query); dados.SetValue("U_Filial", dados.Offset, cmbFilial.ValidValues.Item(0).Value); dados.SetValue("U_Cnpj", dados.Offset, GetCnpjFilial(cmbFilial.ValidValues.Item(0).Value)); dados.SetValue("U_DocDueDate", dados.Offset, DateTime.Now.ToString("yyyyMMdd")); dados.SetValue("U_DocDate", dados.Offset, DateTime.Now.ToString("yyyyMMdd")); Matrix0.AutoResizeColumns(); UIAPIRawForm.Freeze(false); }
protected virtual void OnFormLoadBefore(SBOItemEventArg pVal, out bool BubbleEvent) { List <DoverFormBase> pendingList; // forms that does not have UniqueID. Type implementationType; IForm form = sapApp.Forms.Item(pVal.FormUID); string key = form.TypeEx; BubbleEvent = true; if (pendingForms.TryGetValue(key, out pendingList)) { pendingForms.Remove(key); foreach (var addOneForm in pendingList) { addOneForm.OnFormLoadBefore(pVal, out BubbleEvent); } } else if (formImplementationType.TryGetValue(key, out implementationType) && !events.ContainsKey(pVal.FormUID)) // if no form was registered, it's a system or udo form. { DoverFormBase addOneSysForm = (DoverFormBase)ContainerManager.Container.Resolve(implementationType); addOneSysForm.FormUID = pVal.FormUID; RegisterForm(pVal.FormUID, addOneSysForm); addOneSysForm.OnFormLoadBefore(pVal, out BubbleEvent); } }
private void mtxRefound_DoubleClickAfter(object sboObject, SBOItemEventArg pVal) { if (mIntRowSelected > 0) { LoadFormReceipts(); } }
private void mtxRefound_ClickBefore(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (pVal.Row > 0) { mtxRefound.SelectRow(pVal.Row, true, false); mIntRowSelected = pVal.Row; int lIntRowStatus = Convert.ToInt32(DtMatrix.GetValue("C_Status", mIntRowSelected - 1).ToString()); if (lIntRowStatus == 4) { ShowControlsPayment(); } else { HiddecontrolsPayments(); } } } catch (Exception ex) { LogService.WriteError("frmSearchRefunds (mtxRefound_ClickBefore) " + ex.Message); LogService.WriteError(ex); } }
private void lObjTxt_Validate(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (mBoolLoaded && mIntActualRoute == mModalFrmRouteFinder.mIntCode) { if (pVal.ItemChanged) { lObjBtnUpdate.Caption = "Actualizar"; lObjBtnUpdate.Item.Enabled = true; } } else { if (pVal.ItemChanged) { lObjBtnUpdate.Caption = "Nuevo"; lObjBtnUpdate.Item.Enabled = true; } } } catch (Exception ex) { LogService.WriteError("JournalService (CreateAction): " + ex.Message); LogService.WriteError(ex); UIApplication.ShowMessageBox(string.Format("CreateAction: {0}", ex.Message)); } }
protected virtual void exportBT_ClickAfter(object sboObject, SBOItemEventArg pVal) { object[] codes = GetDataTableCodes(); string xml = string.Empty; switch (expType.Value) { case "UDO": xml = b1DAO.GetXMLBom <UserObjectsMD>(codes, BoObjectTypes.oUserObjectsMD); break; case "UDT": xml = b1DAO.GetXMLBom <UserTablesMD>(codes, BoObjectTypes.oUserTables); break; case "UDF": xml = b1DAO.GetXMLBom <UserFieldsMD>(codes, BoObjectTypes.oUserFields); break; } SelectFileDialog dialog = new SelectFileDialog("C:\\", "", "|*.xml", DialogType.SAVE); dialog.Open(); if (!string.IsNullOrEmpty(dialog.SelectedFile)) { File.WriteAllText(dialog.SelectedFile, xml); Logger.Info(Messages.ExportDBInfoSuccess); this.UIAPIRawForm.Close(); } else { Logger.Error(Messages.ExportDBInfoFileNotFound); } }
private void Button0_ClickBefore(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; //connection Grid Grid_Data_Write(); Matrix_Data_Write(); }
private void mtx0_ClickAfter(object sboObject, SBOItemEventArg pVal) { mIntRow = pVal.Row; if (mIntRow > 0) { mtxInvoices.SelectRow(mIntRow, true, false); } }
/// <summary> /// ComboBox Event /// </summary> /// <param name="sboObject"></param> /// <param name="pVal"></param> private void cbxType_ComboSelectAfter(object sboObject, SBOItemEventArg pVal) { selectedRow = 0; var type = (cbxType.Value.Contains("Subasta")) ? "S" : "N"; FillMatrix0("ClientDataTable", dt0, type); ClearMtx(mtx1); }
// work arround because AffectsFormMode for ComboSelect is not working the way we expect. protected virtual void StatusChangeBefore(object data, SBOItemEventArg args, out bool BubbleEvent) { BubbleEvent = true; if (args.ColUID == "Status") { this.UIAPIRawForm.Freeze(true); } }
protected virtual void confirm_ClickAfter(object sboObject, SBOItemEventArg pVal) { if (BaseForm != null) { BaseForm.InstallAddin(addinName, addinNamespace); } this.UIAPIRawForm.Close(); }
private void btnReturn_ClickBefore(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; if (!Object.ReferenceEquals(transferItems, null)) { CreateTransfer(true); } }
private void EditText19_ChooseFromListAfter(object sboObject, SBOItemEventArg pVal) { if (((SAPbouiCOM.SBOChooseFromListEventArg)(pVal)).SelectedObjects != null) { _selectedBP = ((SAPbouiCOM.SBOChooseFromListEventArg)(pVal)).SelectedObjects.GetValue(0, 0) .ToString(); } }
private void EditText15_ChooseFromListAfter(object sboObject, SBOItemEventArg pVal) { if (((SBOChooseFromListEventArg)pVal).SelectedObjects != null) { _selectedPList = ((SBOChooseFromListEventArg)pVal).SelectedObjects.GetValue(0, 0) .ToString(); } }
protected virtual void innerException_ClickAfter(object sboObject, SBOItemEventArg pVal) { if (_ex.InnerException != null) { var traceForm = ContainerManager.Container.Resolve<ExceptionTrace>(); traceForm.ex = _ex.InnerException; traceForm.Show(); } }
protected virtual void GeneralGridStatusChange(object data, SBOItemEventArg args) { if (args.ColUID == "Status") { var selectedRow = args.Row; var code = generalGrid.DataTable.Columns.Item("Code").Cells.Item(selectedRow).Value.ToString(); var status = generalGrid.DataTable.Columns.Item("Status").Cells.Item(selectedRow).Value.ToString(); Permission permission = PermissionManager.ParsePermissionStr(status); PermissionManager.ConfigureAddIn(code, permission); if (this.UIAPIRawForm.Mode == BoFormMode.fm_UPDATE_MODE) this.UIAPIRawForm.Mode = BoFormMode.fm_OK_MODE; this.UIAPIRawForm.Freeze(false); } }
protected virtual void installButton_ClickAfter(object sboObject, SBOItemEventArg pVal) { if (string.IsNullOrWhiteSpace(modulePath.Value)) { Logger.Error(Messages.AdminEmptyFile); return; } try { licenseManager.SaveLicense(modulePath.Value); updateLicenseDT(); Logger.Info(Messages.LicenseSuccessInstall); } catch (ArgumentException) { Logger.Error(Messages.LicenseErrorInstall); } }
protected virtual void OnFormUnloadBefore(SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; DoverFormBase addOneForm; if (events.TryGetValue(pVal.FormUID, out addOneForm)) { addOneForm.OnFormUnloadBefore(pVal, out BubbleEvent); } }
protected virtual void OnFormLoadBefore(SBOItemEventArg pVal, out bool BubbleEvent) { List<DoverFormBase> pendingList; // forms that does not have UniqueID. Type implementationType; IForm form = sapApp.Forms.Item(pVal.FormUID); string key = form.TypeEx; BubbleEvent = true; if (pendingForms.TryGetValue(key, out pendingList)) { pendingForms.Remove(key); foreach (var addOneForm in pendingList) { addOneForm.OnFormLoadBefore(pVal, out BubbleEvent); } } else if (formImplementationType.TryGetValue(key, out implementationType) && !events.ContainsKey(pVal.FormUID)) // if no form was registered, it's a system or udo form. { DoverFormBase addOneSysForm = (DoverFormBase)ContainerManager.Container.Resolve(implementationType); addOneSysForm.FormUID = pVal.FormUID; RegisterForm(pVal.FormUID, addOneSysForm); addOneSysForm.OnFormLoadBefore(pVal, out BubbleEvent); } }
protected virtual void cancel_ClickAfter(object sboObject, SBOItemEventArg pVal) { this.UIAPIRawForm.Close(); }
protected virtual void confirm_ClickAfter(object sboObject, SBOItemEventArg pVal) { if (BaseForm != null) BaseForm.InstallAddin(addinName, addinNamespace); this.UIAPIRawForm.Close(); }
protected virtual void expType_ComboSelectAfter(object sboObject, SBOItemEventArg pVal) { DataTable dt = this.UIAPIRawForm.DataSources.DataTables.Item(expType.Value); expDT.LoadSerializedXML(BoDataTableXmlSelect.dxs_DataOnly, dt.SerializeAsXML(BoDataTableXmlSelect.dxs_DataOnly)); }
protected virtual void exportBT_ClickAfter(object sboObject, SBOItemEventArg pVal) { object[] codes = GetDataTableCodes(); string xml = string.Empty; switch (expType.Value) { case "UDO": xml = b1DAO.GetXMLBom<UserObjectsMD>(codes, BoObjectTypes.oUserObjectsMD); break; case "UDT": xml = b1DAO.GetXMLBom<UserTablesMD>(codes, BoObjectTypes.oUserTables); break; case "UDF": xml = b1DAO.GetXMLBom<UserFieldsMD>(codes, BoObjectTypes.oUserFields); break; } SelectFileDialog dialog = new SelectFileDialog("C:\\", "", "|*.xml", DialogType.SAVE); dialog.Open(); if (!string.IsNullOrEmpty(dialog.SelectedFile)) { File.WriteAllText(dialog.SelectedFile, xml); Logger.Info(Messages.ExportDBInfoSuccess); this.UIAPIRawForm.Close(); } else { Logger.Error(Messages.ExportDBInfoFileNotFound); } }
protected virtual void startButton_ClickAfter(object sboObject, SBOItemEventArg pVal) { for (int i = 0; i < moduleGrid.Rows.SelectedRows.Count; i++) { int rowId = moduleGrid.Rows.SelectedRows.Item(i, BoOrderType.ot_RowOrder); string moduleCode = (string)moduleDT.GetValue("Code", rowId); string type = (string)moduleDT.GetValue("Type", rowId); if (type == "AddIn") frameworkAddinManager.StartAddin(moduleCode); } UpdateGrid(); moduleGrid_ClickAfter(sboObject, pVal); }
protected virtual void OnFormVisibleAfter(SBOItemEventArg pVal) { DoverFormBase addOneForm; if (events.TryGetValue(pVal.FormUID, out addOneForm)) { addOneForm.OnFormVisibleAfter(pVal); } }
protected virtual void UpdateUserConfiguration(object data, SBOItemEventArg args) { if (gridUser.Rows.SelectedRows.Count > 0) { var index = gridUser.Rows.SelectedRows.Item(0, BoOrderType.ot_RowOrder); var username = gridUser.DataTable.Columns.Item("UserName").Cells.Item(index).Value.ToString(); configTemp.ExecuteQuery(string.Format(userConfigSQLTemplate, username)); if (!(configTemp.Rows.Count == 1 && string.IsNullOrEmpty(configTemp.GetValue("Code", 0).ToString()))) { gridCfg.DataTable.LoadSerializedXML(BoDataTableXmlSelect.dxs_DataOnly, configTemp.SerializeAsXML(BoDataTableXmlSelect.dxs_DataOnly)); gridCfg.ComboSelectBefore += new _IGridEvents_ComboSelectBeforeEventHandler(StatusChangeBefore); gridCfg.ComboSelectAfter += new _IGridEvents_ComboSelectAfterEventHandler(UserConfigStatusChange); } } }
protected internal override void OnFormActivateAfter(SBOItemEventArg pVal) { Initialize(); }
protected virtual void UserConfigStatusChange(object data, SBOItemEventArg args) { if (args.ColUID == "Status" && gridUser.Rows.SelectedRows.Count > 0) { var index = gridUser.Rows.SelectedRows.Item(0, BoOrderType.ot_RowOrder); var username = gridUser.DataTable.Columns.Item("UserName").Cells.Item(index).Value.ToString(); var selectedRow = args.Row; var code = gridCfg.DataTable.Columns.Item("Code").Cells.Item(selectedRow).Value.ToString(); var status = gridCfg.DataTable.Columns.Item("Status").Cells.Item(selectedRow).Value.ToString(); Permission permission = PermissionManager.ParsePermissionStr(status); PermissionManager.ConfigureAddIn(code, username, permission); if (this.UIAPIRawForm.Mode == BoFormMode.fm_UPDATE_MODE) this.UIAPIRawForm.Mode = BoFormMode.fm_OK_MODE; this.UIAPIRawForm.Freeze(false); } }
protected virtual void moduleGrid_ClickAfter(object sboObject, SBOItemEventArg pVal) { try { this.UIAPIRawForm.Freeze(true); bool enableRemove = false, enableStart = false, enableStop = false, enableInstall = false, isAddin; for (int i = 0; i < moduleGrid.Rows.SelectedRows.Count; i++) { string type = (string)moduleDT.GetValue("Type", moduleGrid.Rows.SelectedRows.Item(i, BoOrderType.ot_SelectionOrder)); isAddin = (type == "AddIn"); if (isAddin) enableRemove = true; string status = (string)moduleDT.GetValue("Status", moduleGrid.Rows.SelectedRows.Item(i, BoOrderType.ot_SelectionOrder)); string installed = (string)moduleDT.GetValue("Installed", moduleGrid.Rows.SelectedRows.Item(i, BoOrderType.ot_SelectionOrder)); enableInstall = (installed == "N") || enableInstall; enableStart = ((status == "S") && isAddin) || enableStart; enableStop = (!enableStart && isAddin) || enableStop; } this.removeButton.Item.Enabled = enableRemove; this.startButton.Item.Enabled = enableStart; this.shutdownButton.Item.Enabled = enableStop; this.installButton.Item.Enabled = enableInstall; // History column event. if (pVal.ColUID == "History") { string module = (string)moduleDT.GetValue("Name", pVal.Row); var logForm = CreateForm<ChangeLog>(); logForm.LogMessage.Value = frameworkAddinManager.GetAddinChangeLog(module); logForm.Show(); } } finally { this.UIAPIRawForm.Freeze(false); } }