private void commandCancel_Execute(object sender, Ifs.Fnd.Windows.Forms.FndCommandExecuteEventArgs e) { // Dialog class have CancelButton set to run this logic even if the user close the dialog trough the esc button. // PPJ dialog close trough Sal.EndDialog so we set DialogResult to prevent the dialog from closing premature. DialogResult = DialogResult.None; Sal.EndDialog(this, Sys.IDCANCEL); }
private void commandOk_Execute(object sender, Ifs.Fnd.Windows.Forms.FndCommandExecuteEventArgs e) { // Dialog class have AcceptButton set to run this logic if the user ends the dialog using the Return button. // PPJ dialog close trough Sal.EndDialog so we set DialogResult to prevent the dialog from closing premature. DialogResult = DialogResult.None; SalBoolean bOK = false; SalString stmt = ""; stmt = @"&AO.Exm_Inventory_Product_API.Add_prudct( :i_hWndFrame.dlgReceiveItem.dfnInventoryLocationId IN, :i_hWndFrame.dlgReceiveItem.dfnInventoryId IN, :i_hWndFrame.dlgReceiveItem.dfnPartId IN, :i_hWndFrame.dlgReceiveItem.dfnAddQty IN)"; bOK = DbPLSQLTransaction(cSessionManager.c_hSql, stmt); Sal.EndDialog(this, Sys.IDOK); }
public new SalNumber UserMethod(SalNumber nWhat, SalString sMethod) { #region Actions using (new SalContext(this)) { if (sMethod == "ok") { switch (nWhat) { case Ifs.Fnd.ApplicationForms.Const.METHOD_Inquire: return(1); case Ifs.Fnd.ApplicationForms.Const.METHOD_Execute: if (!(CheckPassword())) { return(0); } else { SavePassword(); return(Sal.EndDialog(this, Sys.IDOK)); } } } else if (sMethod == "cancel") { switch (nWhat) { case Ifs.Fnd.ApplicationForms.Const.METHOD_Inquire: return(1); case Ifs.Fnd.ApplicationForms.Const.METHOD_Execute: Sal.EndDialog(this, Sys.IDCANCEL); break; } } } return(0); #endregion }