public void OpenStockTransferForm() { try { if (!Object.ReferenceEquals(requestTransfers, null)) { LogService.WriteInfo("Begin Transfer for Document: " + requestTransfers[0].DocNum); SAPMatrix.SetColumnQuantities(mtx0, "Quantity", requestTransfers, "Quantity"); requestTransfers[0].Observations = txtObserv.Value; var result = StockTransferDI.CreateDraft(requestTransfers, user); if (result.Success) { Form form = SAPbouiCOM.Framework.Application.SBO_Application.OpenForm((BoFormObjectEnum)112, "", result.DocEntry.ToString()); this.UIAPIRawForm.Close(); Task.Factory.StartNew(() => { AlertMessageDI.Create(new MessageDTO() { UserCode = foodTransferDAO.GetUserCode(requestTransfers[0].UserID.ToString()), Message = "Se ha realizado la transferencia de mercancia solicitada en el documento #" + requestTransfers[0].DocNum }); }); LogService.WriteInfo("End Transfer for Document: " + requestTransfers[0].DocNum); } else { UIApplication.ShowMessageBox(result.Message); } } } catch (Exception ex) { SAPException.Handle(ex, "OpenStockTransferForm"); } }
private void btnCancel_ClickBefore(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; if (btnCancel.Item.Enabled) { SAPMatrix.SetColumnQuantities(mtx0, "Consumed", components, "Qty"); CreateDocuments(true); } }
private void SetBagsBalesAndRealQuantity() { SAPMatrix.SetColumnQuantities(mtx0, "Bags", components, "Bags"); if (!chkStatus.Checked && !String.IsNullOrEmpty(txtBags.Value)) { productionLine.Bags = Double.Parse(txtBags.Value); } productionLine.Qty = Double.Parse(txtQReal.Value); }
private void btnCreate_ClickBefore(object sboObject, SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; if (btnCreate.Item.Enabled) { SAPMatrix.SetColumnQuantities(mtx0, "Qty", components, "Qty"); if (components.Where(l => l.Qty == 0).Count() == components.Length) { return; } CreateDocuments(false); } }