public static void SetValue(ref SAPbouiCOM.Column oColumn, object line, dynamic value) { var cell = oColumn.Cells.Item(line); try { switch (oColumn.Type) { case SAPbouiCOM.BoFormItemTypes.it_EDIT: case SAPbouiCOM.BoFormItemTypes.it_EXTEDIT: ((SAPbouiCOM.EditText)cell.Specific).Value = value; break; case SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX: ((SAPbouiCOM.ComboBox)cell.Specific).Select(value.ToString(), SAPbouiCOM.BoSearchKey.psk_ByValue); break; case SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX: ((SAPbouiCOM.CheckBox)cell.Specific).Checked = value; break; default: throw new SUIException(1, $"The column {oColumn.UniqueID} not exist."); } } finally { } }
public static klib.Dynamic GetValue(SAPbouiCOM.Column oColumn, object line, string msgnull = null) { var value = String.Empty; var cell = oColumn.Cells.Item(line); try { switch (oColumn.Type) { case SAPbouiCOM.BoFormItemTypes.it_EDIT: case SAPbouiCOM.BoFormItemTypes.it_EXTEDIT: value = ((SAPbouiCOM.EditText)cell.Specific).Value; break; case SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX: value = ((SAPbouiCOM.ComboBox)cell.Specific).Selected.Value; break; case SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX: value = ((SAPbouiCOM.CheckBox)cell.Specific).Checked.ToString(); break; default: throw new SUIException(1, $"The column {oColumn.UniqueID} not exist."); } if (!String.IsNullOrEmpty(msgnull) && String.IsNullOrEmpty(value)) { throw new SUIException(10, oColumn.UniqueID, oColumn.Description); } return(klib.ValuesEx.To(value)); } finally { } }
private void desenharCampos() { oItem = oForm.Items.Item("7"); oNewItem = oForm.Items.Add("Ver_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 880; oNewItem.Top = oItem.Top + 205; oNewItem.Height = 120; oNewItem.FromPane = 11; oNewItem.ToPane = 11; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("Ver_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Ver_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; oColumn = oColumns.Add("Ver_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Data Verificação"; oColumn.Width = 80; oColumn.Editable = true; /*oColumn = oColumns.Add("Ver_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); * oColumn.TitleObject.Caption = "Verificado por"; * oColumn.Width = 100; * oColumn.Editable = true; * oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_ENT_PENDENC");*/ oColumn = oColumns.Add("Ver_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Verificado por"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Ver_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Observações"; oColumn.Width = 470; oColumn.Editable = true; oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Ver_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Ver_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_VRF_DATEVER"); oColumn = oColumns.Item("Ver_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_VRF_VERIFPO"); oColumn = oColumns.Item("Ver_Amb_C3"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_VRF_OBS"); }
private void InitiallizeForm() { oForm.Freeze(true); initiallizing = true; BOQD = oForm.DataSources.DataTables.Item("BOQD"); BOQH = oForm.DataSources.DataTables.Item("BOQH"); BOQID = oForm.DataSources.DataTables.Item("BOQID"); BOQH.Rows.Add(1); mtIC = (SAPbouiCOM.Matrix)oForm.Items.Item("mtIC").Specific; mtDC = (SAPbouiCOM.Matrix)oForm.Items.Item("mtDC").Specific; SAPbouiCOM.Column col = mtDC.Columns.Item("cType"); col.ValidValues.Add("S", "Service"); col.ValidValues.Add("I", "Item"); col.DisplayDesc = true; txCode = (SAPbouiCOM.EditText)oForm.Items.Item("txCode").Specific; txName = (SAPbouiCOM.EditText)oForm.Items.Item("txName").Specific; txDCB = (SAPbouiCOM.EditText)oForm.Items.Item("txDCB").Specific; txICB = (SAPbouiCOM.EditText)oForm.Items.Item("txICB").Specific; txTCB = (SAPbouiCOM.EditText)oForm.Items.Item("txTCB").Specific; txDCA = (SAPbouiCOM.EditText)oForm.Items.Item("txDCA").Specific; cbRule = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbRule").Specific; txACode = (SAPbouiCOM.EditText)oForm.Items.Item("txACode").Specific; txAName = (SAPbouiCOM.EditText)oForm.Items.Item("txAName").Specific; txRemarks = (SAPbouiCOM.EditText)oForm.Items.Item("txRemarks").Specific; cflOitm = (SAPbouiCOM.ChooseFromList)oForm.ChooseFromLists.Item("cflOitm"); cmdDR = (SAPbouiCOM.Button)oForm.Items.Item("cmdDR").Specific; SAPbouiCOM.Conditions oCons = cflOitm.GetConditions(); SAPbouiCOM.Condition oCon = oCons.Add(); oCon.Alias = "ItemType"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "F"; cflOitm.SetConditions(oCons); fillCB(); oForm.Freeze(false); initiallizing = false; }
private void BindMatrix(SAPbouiCOM.Matrix oMatrix, string mtCol, string dtCol, string dt = null) { try { SAPbouiCOM.Column oColumn = oMatrix.Columns.Item(mtCol); if (dt == null) { oColumn.DataBind.Bind(dtCCTransLog, dtCol); } else { oColumn.DataBind.Bind(dt, dtCol); } }catch (Exception ex) { errorLog("Can not bind " + mtCol + " to " + dtCol + ". error: " + ex.Message); } }
private void fillCbs() { cbFilter.ValidValues.Add("Status", "Status"); cbFilter.ValidValues.Add("Product", "Product"); cbFilter.Select(0, SAPbouiCOM.BoSearchKey.psk_Index); SAPbouiCOM.Column ProdLine = mtReport.Columns.Item("cProdLine"); SAPbouiCOM.Column Label = mtReport.Columns.Item("cLabel"); insertProdType(); string cbDataSql = "Select * from [@PMX_OSPL]"; System.Data.DataTable cbData = Program.objHrmsUI.getDataTable(cbDataSql, "Get CB Data"); foreach (System.Data.DataRow dr in cbData.Rows) { ProdLine.ValidValues.Add(dr["Code"].ToString(), dr["Name"].ToString()); cbPL.ValidValues.Add(dr["Code"].ToString(), dr["Name"].ToString()); btPL.ValidValues.Add(dr["Code"].ToString(), dr["Name"].ToString()); } cbPL.Select(0, SAPbouiCOM.BoSearchKey.psk_Index); //int cnt = Convert.ToInt32( Program.objHrmsUI.getScallerValue("Select count(*) from [@B1_Label]")); //if (cnt == 0) //{ // insertLabel(); //} //cbDataSql = "Select * from [@B1_Label]"; //cbData = Program.objHrmsUI.getDataTable(cbDataSql, "Get CB Data"); //foreach (System.Data.DataRow dr in cbData.Rows) //{ // // Label.ValidValues.Add(dr["Code"].ToString(), dr["Name"].ToString()); //} Label.ValidValues.Add("", " "); Label.ValidValues.Add("Red", "Red"); Label.ValidValues.Add("Yellow", "Yellow"); Label.ValidValues.Add("Green", "Green"); Label.ValidValues.Add("Magenta", "Magenta"); Label.ValidValues.Add("Orange", "Orange"); }
private void BindMatrixItem(SAPbouiCOM.Matrix oMatrix1, string mtCol, string dtCol, string dt = null, bool editable = false) { try { SAPbouiCOM.Column oColumn = oMatrix1.Columns.Item(mtCol); oColumn.Editable = editable; if (dt == null) { oColumn.DataBind.Bind(MtxItem, dtCol); } else { oColumn.DataBind.Bind(dt, dtCol); } } catch (Exception ex) { errorLog("Can not bind " + mtCol + " to " + dtCol + ". error: " + ex.Message); } }
public override void etBeforeCfl(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent) { base.etBeforeCfl(ref pVal, ref BubbleEvent); SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent)pVal; mtDC.FlushToDataSource(); if (pVal.ItemUID == mtDC.Item.UniqueID && pVal.ColUID == "cCode") { SAPbouiCOM.ComboBox cbColType = (SAPbouiCOM.ComboBox)mtDC.Columns.Item("cType").Cells.Item(pVal.Row).Specific; SAPbouiCOM.Column CodCol = mtDC.Columns.Item("cCode"); if (cbColType.Selected.Value == "I") { CodCol.ChooseFromListUID = "cflrOITM"; CodCol.ChooseFromListAlias = "ItemCode"; } if (cbColType.Selected.Value == "S") { CodCol.ChooseFromListUID = "cflrGL"; CodCol.ChooseFromListAlias = "AcctCode"; } } }
/// <summary> /// Load CFL Handler /// </summary> /// <param name="oForm"></param> /// <param name="pVal"></param> /// <param name="BubbleEvent"></param> void AppMainCflLoadHandler(SAPbouiCOM.Form oForm, SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { SAPbouiCOM.ChooseFromListCollection oUserCfls; SAPbouiCOM.ChooseFromList oUserCFL; SAPbouiCOM.ChooseFromListCreationParams oUserCflCreationParams = PublicVariable.oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams); oUserCfls = oForm.ChooseFromLists; oUserCflCreationParams.MultiSelection = false; oUserCflCreationParams.ObjectType = "12"; oUserCflCreationParams.UniqueID = "CFL_UserCode"; oUserCFL = oUserCfls.Add(oUserCflCreationParams); SAPbouiCOM.Matrix oMat = (SAPbouiCOM.Matrix)oForm.Items.Item("3").Specific; SAPbouiCOM.Column oCodeColumns = (SAPbouiCOM.Column)oMat.Columns.Item("U_Code"); if (oCodeColumns.ChooseFromListUID != "CFL_UserCode") { oCodeColumns.ChooseFromListUID = "CFL_UserCode"; oCodeColumns.ChooseFromListAlias = "USER_CODE"; SAPbouiCOM.Column oDocEntryColumns = (SAPbouiCOM.Column)oMat.Columns.Item("DocEntry"); oDocEntryColumns.Visible = false; SAPbouiCOM.Column oDocNumColumns = (SAPbouiCOM.Column)oMat.Columns.Item("DocNum"); oDocNumColumns.Visible = false; } } catch (Exception ex) { Events.App_StatusBarEvent( ex.Message , SAPbouiCOM.BoMessageTime.bmt_Short , SAPbouiCOM.BoStatusBarMessageType.smt_Warning); } }
private void AddCCLogMatrix(SAPbouiCOM.Form form, int pane, string refID = "39", int height = 0, int top = 0) { try{ SAPbouiCOM.Item oItem = form.Items.Add(mxtCCLog, SAPbouiCOM.BoFormItemTypes.it_MATRIX); oItem.FromPane = pane; oItem.ToPane = pane; SAPbouiCOM.Item oItemRef = form.Items.Item(refID); oItem.Top = oItemRef.Top + top; oItem.Left = oItemRef.Left; oItem.Width = oItemRef.Width; oItem.Height = oItemRef.Height + height; SAPbouiCOM.Matrix oMatrix = form.Items.Item(mxtCCLog).Specific; SAPbouiCOM.Column oColumn = oMatrix.Columns.Add("RefNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ref. No."; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("PaymentID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Journal Entry"; SAPbouiCOM.LinkedButton btn = oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_JournalPosting).ToString(); oColumn.Width = 50; oColumn = oMatrix.Columns.Add("OrderID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Order"; btn = oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Order).ToString(); oColumn.Width = 50; oColumn = oMatrix.Columns.Add("InvoiceID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Invoice"; btn = oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Invoice).ToString(); oColumn.Width = 50; oColumn = oMatrix.Columns.Add("CMID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Credit Memo"; btn = oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_InvoiceCreditMemo).ToString(); oColumn.Width = 50; oColumn = oMatrix.Columns.Add("command", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Command"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("Amount", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Amount"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("Desc", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Description"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("CardHolder", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Card Holder"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("crCardNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Card No."; oColumn.Width = 50; /* * oColumn = oMatrix.Columns.Add("result", SAPbouiCOM.BoFormItemTypes.it_EDIT); * oColumn.TitleObject.Caption = "Result"; * oColumn.Width = 50; */ oColumn = oMatrix.Columns.Add("error", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Error"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("avs", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "AVS"; oColumn.Width = 150; oColumn = oMatrix.Columns.Add("CardCode", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Card Code"; oColumn.Width = 150; oColumn = oMatrix.Columns.Add("CardLevel", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Card Level"; oColumn.Width = 150; oColumn = oMatrix.Columns.Add("custNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Customer Number"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("CCAID", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Credit Card"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("recdate", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Process Date"; oColumn.Width = 100; oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single; //populateLog(form); } catch (Exception ex) { errorLog(ex); } }
private void CreatePayOnTermForm() { try { ManualScan = "0"; SAPbouiCOM.Item oItem = null; SAPbouiCOM.Button oButton = null; //SAPbouiCOM.StaticText oStaticText = null; // SAPbouiCOM.EditText oEditText = null; //SAPbouiCOM.ComboBox oComboBox = null; // add a new form SAPbouiCOM.FormCreationParams oCreationParams = null; oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams))); oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed; oCreationParams.FormType = formPayOnTerm; oCreationParams.UniqueID = formPayOnTerm; try { oPayOnTermForm = SBO_Application.Forms.AddEx(oCreationParams); } catch (Exception) { oPayOnTermForm = SBO_Application.Forms.Item(formPayOnTerm); } // set the form properties oPayOnTermForm.Title = "eBizCharge Batch Invoicing for Preauth"; oPayOnTermForm.Left = 400; oPayOnTermForm.Top = 100; oPayOnTermForm.ClientHeight = 460; oPayOnTermForm.ClientWidth = 750; //************************ // Adding a Rectangle //*********************** int margin = 5; oItem = oPayOnTermForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE); oItem.Left = margin; oItem.Width = oPayOnTermForm.ClientWidth - 2 * margin; oItem.Top = margin; oItem.Height = oPayOnTermForm.ClientHeight - 40; int nTopGap = 25; int left = 6; int wBtn = 70; int hBtn = 19; int span = 80; if (cfgBatchAutoMode == "Y") { oItem = oPayOnTermForm.Items.Add(btnRefresh, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oPayOnTermForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Orders"; left += span; } oItem = oPayOnTermForm.Items.Add(btnInvoice, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oPayOnTermForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Process"; left += span; oItem = oPayOnTermForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oPayOnTermForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Cancel"; margin = 8; int top = 15; int edL = 150; //oItm.Left + oItm.Width; int edW = 100; int edH = 15; int nGap = 26; if (cfgBatchAutoMode == "Y") { oItem = addPaneItem(oPayOnTermForm, editStartDate, edL, top, edW, edH, "Start Date:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1); } else { oItem = addPaneItem(oPayOnTermForm, editStartDate, edL, top, edW, edH, "Delivery Note:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1); } /* * oItem = oPayOnTermForm.Items.Add(btnFind, SAPbouiCOM.BoFormItemTypes.it_BUTTON); * oItem.Left = edL + 120; * oItem.Width = wBtn; * oItem.Top = top - 2; * oItem.Height = hBtn; * * oButton = ((SAPbouiCOM.Button)(oItem.Specific)); * * if (cfgBatchAutoMode == "Y") * oButton.Caption = "Report"; * else * oButton.Caption = "Scan"; */ // oItem = addPaneItem(oPayOnTermForm, editEndDate, edL + 400, top, edW, edH, "Invoice Date:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 99); top = oItem.Top + nGap; oItem = oPayOnTermForm.Items.Add(matrixPayOnTerm, SAPbouiCOM.BoFormItemTypes.it_MATRIX); oItem.FromPane = 0; oItem.ToPane = 0; oItem.Left = 5 + margin; oItem.Width = oPayOnTermForm.ClientWidth - 2 * margin - 10; oItem.Top = top; oItem.Height = oPayOnTermForm.ClientHeight - 100; top = oItem.Height + oItem.Top + 2; SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oPayOnTermForm.Items.Item(matrixPayOnTerm).Specific; SAPbouiCOM.Column oColumn = oMatrix.Columns.Add("RefNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Auth Code"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("InvoiceID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Invoice"; SAPbouiCOM.LinkedButton btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Invoice).ToString(); oColumn.Width = 40; oColumn = oMatrix.Columns.Add("DeliveryID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Delivery"; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_DeliveryNotes).ToString(); oColumn.Width = 40; oColumn = oMatrix.Columns.Add("DeliveryNo", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Delivery No."; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("OrderID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Order"; oColumn.Width = 40; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Order).ToString(); oColumn = oMatrix.Columns.Add("customerID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Customer"; oColumn.Width = 40; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_BusinessPartner).ToString(); oColumn = oMatrix.Columns.Add("CardHolder", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Name"; oColumn.Width = 100; oColumn = oMatrix.Columns.Add("Amount", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Amount"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("avsResult", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "AVS"; oColumn.Width = 200; oColumn = oMatrix.Columns.Add("Result", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Result"; oColumn.Width = 200; /* * oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single; * DateTime dt = getLastBatchDate(); * * if (dt < DateTime.Parse("01/01/2000")) * dt = DateTime.Today.AddDays(-3); */ // if(cfgBatchAutoMode=="Y") setFormEditVal(oPayOnTermForm, editStartDate, DateTime.Today.AddDays(-15).ToString("MM/dd/yyyy")); populatePayOnTermMatrix(false); } catch (Exception ex) { errorLog(ex); } oPayOnTermForm.Visible = true; }
private void desenharCampos() { oItem = oForm.Items.Item("Grade"); oNewItem = oForm.Items.Add("Apr_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 65; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Ambiente / Análise Crítica"; oNewItem = oForm.Items.Add("Apr_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 200; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Ambiente / Aprovação"; oNewItem = oForm.Items.Add("Apr_Text2a", SAPbouiCOM.BoFormItemTypes.it_STATIC); oItem = oForm.Items.Item("Grade"); oNewItem.Top = oItem.Top + 17; oNewItem.Height = 19; oNewItem.Width = 400; oNewItem.Left = 25; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Data"; oNewItem = oForm.Items.Add("Apr_Text2b", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 17; oNewItem.Height = 19; oNewItem.Width = 400; oNewItem.Left = 120; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Hora"; oNewItem = oForm.Items.Add("Apr_Text2c", SAPbouiCOM.BoFormItemTypes.it_STATIC); oItem = oForm.Items.Item("Grade"); oNewItem.Top = oItem.Top + 17; oNewItem.Height = 19; oNewItem.Width = 400; oNewItem.Left = 175; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Projetista"; oNewItem = oForm.Items.Add("Apr_Data", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 35; oNewItem.Height = 17; oNewItem.Width = 80; oNewItem.Left = 25; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_APS_DATE"); oNewItem = oForm.Items.Add("Apr_Hora", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 35; oNewItem.Height = 17; oNewItem.Width = 40; oNewItem.Left = 120; oNewItem.FromPane = 12; oNewItem.ToPane = 12; //oEditItem.DataBind.SetBound(true, "", "EditSource"); oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_APS_HORA"); oNewItem = oForm.Items.Add("Apr_Proj", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oNewItem.Top = oItem.Top + 35; oNewItem.Height = 17; oNewItem.Width = 140; oNewItem.Left = 175; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.DisplayDesc = true; //oComboItem.DataBind.SetBound(true, "", "CombSource"); oComboItem = ((SAPbouiCOM.ComboBox)(oNewItem.Specific)); //oComboItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_APS_PROJT"); //LoadResponsavelComboVals(oComboItem); oNewItem = oForm.Items.Add("Apr_Ped", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 235; oNewItem.Width = 100; oNewItem.Left = 725; oNewItem.Height = 25; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Pedido (fechamento)"; oNewItem = oForm.Items.Add("Apr_Text3", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 220; oNewItem.Height = 19; oNewItem.Width = 50; oNewItem.Left = 840; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Pedido"; oNewItem = oForm.Items.Add("Apr_Pedido", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 240; oNewItem.Height = 17; oNewItem.Width = 40; oNewItem.Left = 840; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Enabled = false; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oNewItem = oForm.Items.Add("Apr_LinkPd", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oNewItem.Top = oItem.Top + 240; oNewItem.Height = 17; oNewItem.Width = 40; oNewItem.Left = 810; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oNewItem.Enabled = true; oLink = ((SAPbouiCOM.LinkedButton)(oNewItem.Specific)); //oLink.LinkedObject = "Apr_Pedido"; oNewItem = oForm.Items.Add("Apr_Ctr", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 300; oNewItem.Width = 100; oNewItem.Left = 725; oNewItem.Height = 25; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Gerar Contrato(s)"; oNewItem = oForm.Items.Add("Apr_Text4", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 285; oNewItem.Height = 19; oNewItem.Width = 55; oNewItem.Left = 840; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Contrato(s)"; oNewItem = oForm.Items.Add("Apr_Contr", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 305; oNewItem.Height = 17; oNewItem.Width = 40; oNewItem.Left = 840; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oNewItem = oForm.Items.Add("Apr_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 420; oNewItem.Top = oItem.Top + 85; oNewItem.Height = 110; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; oColumns = oMatrix.Columns; oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Apr_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; oColumn = oColumns.Add("Apr_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Detalhamento"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Apr_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Id"; oColumn.Editable = true; oColumn.Visible = false; oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Apr_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Apr_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ANC_DETALHA"); oColumn = oColumns.Item("Apr_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "Line"); oNewItem = oForm.Items.Add("NvAnalise", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 35; oNewItem.Width = 140; oNewItem.Left = oForm.Width - 270; oNewItem.Height = 21; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Nova análise crítica"; oNewItem = oForm.Items.Add("Ans_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); SAPbouiCOM.Item teste = oForm.Items.Item("Apr_Amb"); oNewItem.Left = oForm.Width - 270; oNewItem.Width = 200; oNewItem.Top = oItem.Top + 85; oNewItem.Height = 110; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; oColumns = oMatrix.Columns; oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Ans_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Analise Crítica"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Ans_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Id"; oColumn.Editable = true; oColumn.Visible = false; DBDSflx = oForm.DataSources.DBDataSources.Add("@FLX_FB_CONFMED"); oForm.DataSources.DataTables.Add("oDataTableAnalise"); oForm.DataSources.DataTables.Item("oDataTableAnalise").ExecuteQuery("SELECT * FROM [@FLX_FB_ANLCRI] where U_FLX_FB_ANLCRI_ID = '1' and U_FLX_FB_ANLCRI_AMBI = '1'"); oColumn = oColumns.Item("Ans_Amb_C0"); oColumn.DataBind.Bind("oDataTableAnalise", "U_FLX_FB_ANLCRI_ANEX"); oColumn = oColumns.Item("Ans_Amb_C1"); oColumn.DataBind.Bind("oDataTableAnalise", "Code"); oNewItem = oForm.Items.Add("Apv_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 700; oNewItem.Top = oItem.Top + 220; oNewItem.Height = 110; oNewItem.FromPane = 12; oNewItem.ToPane = 12; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Apv_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; oColumn = oColumns.Add("Apv_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Aprovado por"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Apv_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Data Aprovação"; oColumn.Width = 80; oColumn.Editable = true; oColumn = oColumns.Add("Apv_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "PDFs visto com o cliente"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Apv_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Prancha de Imagem"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Apv_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Memorial Descritivo"; oColumn.Width = 130; oColumn.Editable = true; oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Apv_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Apv_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_APROVAD"); oColumn = oColumns.Item("Apv_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_DATAAPR"); oColumn = oColumns.Item("Apv_Amb_C3"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_PDFCLIE"); oColumn = oColumns.Item("Apv_Amb_C4"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_PRANIMG"); oColumn = oColumns.Item("Apv_Amb_C5"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_MEMDESC"); }
//private void OApplication_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) //{ // BubbleEvent = true; // if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ALL_EVENTS_CLICK) // { // } //} private void button1_Click(object sender, EventArgs e) { this.oDBDataSource = this.oForm.DataSources.DBDataSources.Add("OITM"); this.oUserDataSource = this.oForm.DataSources.UserDataSources.Add("user1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20); this.oItem = this.oForm.Items.Add("matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX); this.oItem.Height = Convert.ToInt32(this.oForm.Height * 0.7); this.oItem.Width = Convert.ToInt32(this.oForm.Width * 0.9); this.oItem.Top = 10; this.oMatrix = (SAPbouiCOM.Matrix)oItem.Specific; this.oMatrix.Layout = SAPbouiCOM.BoMatrixLayoutType.mlt_Normal; this.oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; //col1 this.oColumn = this.oMatrix.Columns.Add("col0", SAPbouiCOM.BoFormItemTypes.it_EDIT); this.oColumn.Editable = false; this.oColumn.TitleObject.Caption = "#"; //col2 this.oColumn = this.oMatrix.Columns.Add("Picture", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); this.oColumn.Width = 60; this.oColumn.Description = "Col1"; this.oColumn.TitleObject.Caption = "Picture"; this.oColumn.DisplayDesc = false; this.oColumn.DataBind.SetBound(true, "", "user1"); SAPbouiCOM.ColumnSetting cs = this.oColumn.ColumnSetting; SAPbouiCOM.BoColumnDisplayType dt = cs.DisplayType; cs.DisplayType = SAPbouiCOM.BoColumnDisplayType.cdt_Picture; dt = cs.DisplayType; //col3 this.oColumn = this.oMatrix.Columns.Add("mergecell", SAPbouiCOM.BoFormItemTypes.it_EDIT); this.oColumn.Width = 60; this.oColumn.Description = "Mer"; this.oColumn.TitleObject.Caption = "MergeCell"; this.oColumn.DataBind.SetBound(true, "OITM", "U_string"); this.oColumn.Editable = false; //col4 this.oColumn = this.oMatrix.Columns.Add("ItemName", SAPbouiCOM.BoFormItemTypes.it_EDIT); this.oColumn.Width = 60; this.oColumn.Description = "col2"; this.oColumn.TitleObject.Caption = "OITM - ItemName"; this.oColumn.DataBind.SetBound(true, "OITM", "ItemName"); this.oColumn.Editable = false; //col5 this.oColumn = this.oMatrix.Columns.Add("ItemCode", SAPbouiCOM.BoFormItemTypes.it_EDIT); this.oColumn.Width = 60; this.oColumn.Description = "col3"; this.oColumn.TitleObject.Caption = "OITM - ItemCode"; this.oColumn.DisplayDesc = false; this.oColumn.DataBind.SetBound(true, "OITM", "ItemCode"); this.oColumn.Editable = false; //col6 this.oColumn = this.oMatrix.Columns.Add("U_total", SAPbouiCOM.BoFormItemTypes.it_EDIT); this.oColumn.Width = 60; this.oColumn.Description = "col4"; this.oColumn.TitleObject.Caption = "Total"; this.oColumn.DataBind.SetBound(true, "OITM", "U_total"); this.oColumn.Editable = false; this.oMatrix.Clear(); this.oMatrix.AutoResizeColumns(); this.oDBDataSource.Query(null); this.oMatrix.LoadFromDataSource(); this.oColumn = this.oMatrix.Columns.Item("Picture"); this.oCombo = (SAPbouiCOM.ComboBox) this.oColumn.Cells.Item(1).Specific; string sPathImage = "C:\\BitMap\\Smile.bmp"; this.oCombo.ValidValues.Add(sPathImage, ""); this.oCombo.ValidValues.Add("T", "Text"); this.oCombo.ValidValues.Add("A", "Alternative"); this.oCombo.ValidValues.Add("S", "SubTotal"); }
private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { SAPbouiCOM.BoEventTypes EventEnum = 0; EventEnum = pVal.EventType; BubbleEvent = true; if (pVal.FormType == 320) { if ((pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (!pVal.Before_Action)) { //Laudo_Ini if (pVal.ItemUID == "Laudo_Ini") { abrirRelatorio("Laudo inicial", oForm.Items.Item("74").Specific.Value); } //Ent_Imp if (pVal.ItemUID == "Ent_Imp") { abrirRelatorio("Descricao dos ambientes", oForm.Items.Item("74").Specific.Value); } //Laudo_Int if (pVal.ItemUID == "Laudo_Int") { abrirRelatorio("Laudo intermediario", oForm.Items.Item("74").Specific.Value); } //NvAnalise if (pVal.ItemUID == "NvAnalise") { abrirRelatorio("Analise critica", oForm.Items.Item("74").Specific.Value); } //Laudo_ent if (pVal.ItemUID == "Laudo_Ent") { abrirRelatorio("Laudo de entrega", oForm.Items.Item("74").Specific.Value); } //Pesquisa de satisfacao if (pVal.ItemUID == "Etg_Pq") { abrirRelatorio("Pesquisa de satisfacao", oForm.Items.Item("74").Specific.Value); } //NvLev if (pVal.ItemUID == "NvLev") { abrirRelatorio("Levantamento", ""); } //Etg_Decl if (pVal.ItemUID == "Etg_Decl") { abrirRelatorio("Declaracao de conformidade", oForm.Items.Item("74").Specific.Value); } } // Ao mudar o ambiente if (pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) && pVal.ItemUID == "Ent_Amb" && pVal.ItemChanged) { // Verifica a descricao de Ent_Det se mudou e captura oEditItem = ((SAPbouiCOM.EditText)oForm.Items.Item("Ent_Det").Specific); string sEnt_Det = oEditItem.String; try { if (sEnt_Det != sDescricaoOriginalAmbiente) { int idOOPR = int.Parse(((SAPbouiCOM.EditText)oForm.Items.Item("74").Specific).Value); string selectedValue = ((SAPbouiCOM.ComboBox)oForm.Items.Item("Ent_Amb").Specific).Value; int iSelectedValue; if (selectedValue != "") { iSelectedValue = int.Parse(selectedValue); // Atualiza a Descrição na Oportunidade de Vendas AddOportunidadeVendas(idOOPR, "0", "0", "0", iSelectedValue, sEnt_Det); } } } catch { } } if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) && pVal.ItemUID == "Ent_Amb" && pVal.ItemChanged) { oEditItem = ((SAPbouiCOM.EditText)oForm.Items.Item("Ent_Det").Specific); string idOOPR = ((SAPbouiCOM.EditText)oForm.Items.Item("74").Specific).Value; string selectedValue = ((SAPbouiCOM.ComboBox)oForm.Items.Item("Ent_Amb").Specific).Value; ambiente = new Ambiente(idOOPR); oEditItem.Value = ambiente.getDescricaoEntrevista(selectedValue); } //Evento da Drop. if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ela_Amb")) { string coluna2 = pVal.ColUID; if (coluna2 == "Ela_Amb_C2") { string linha = pVal.Row.ToString(); } } if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ent_Proj")) { upProjEnt = true; //SBO_Application.MessageBox("Mudou Proj Entrevista."); } if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Med_Proj")) { upProjMed = true; //SBO_Application.MessageBox("Mudou Proj Medição."); } if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Apr_Proj")) { upProjAps = true; //SBO_Application.MessageBox("Mudou Proj Apresentação."); } if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ent_Amb")) { upEtvAmb = true; //SBO_Application.MessageBox("Mudou Combo de Ambiente"); } //Abre tela de Atividades. if (((pVal.ItemUID == "Ent_Age") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false))) { bBotaoAgendarFoiClicado = true; SBO_Application.ActivateMenuItem("2563"); } //Abre tela de Atividades. if (((pVal.ItemUID == "Med_Age") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false))) { bBotaoAgendarFoiClicado = true; SBO_Application.ActivateMenuItem("2563"); } //Clique do Botão Atualizar if (((pVal.ItemUID == "1") & (pVal.FormMode == 1) & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false))) { if (ambiente.possuiAmbientesCadastrados()) { Atualizar(); } } //Criar os campos do formulario. if (pVal.Before_Action && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD) { oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount); AddItemsToForm(); oForm.Resize(300, 130);// (132, 100); resumo = new Resumo(oForm); fases = new Fases(oForm); } //Evento do Clique da aba Resumo. if (pVal.ItemUID == "Projeto1" & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action) { resumo.disableCampos(); oForm.PaneLevel = 8; } //Evento do Clique da aba Fases. if (pVal.ItemUID == "Projeto2" & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action) { oForm.PaneLevel = 9; } int panel = 9; if (pVal.ItemUID.StartsWith("Folder") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action) { switch (pVal.ItemUID) { case "Folder1": panel = 9; break; case "Folder2": panel = 10; break; case "Folder3": panel = 11; break; case "Folder4": panel = 12; break; case "Folder5": panel = 13; break; case "Folder6": panel = 14; break; case "Folder7": panel = 15; break; case "Folder8": panel = 16; break; case "Folder9": panel = 17; break; } oForm.PaneLevel = panel; } if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST) { SAPbouiCOM.IChooseFromListEvent oCFLEvento = ((SAPbouiCOM.IChooseFromListEvent)(pVal)); string sCFL_ID = oCFLEvento.ChooseFromListUID; SAPbouiCOM.Form oForm = SBO_Application.Forms.Item(FormUID); SAPbouiCOM.ChooseFromList oCFL = oForm.ChooseFromLists.Item(sCFL_ID); if (oCFLEvento.BeforeAction == false && sCFL_ID == "CFL1") { SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects; string valItemName = null; string valItemCode = null; try { valItemCode = System.Convert.ToString(oDataTable.GetValue(0, 0)); valItemName = System.Convert.ToString(oDataTable.GetValue(1, 0)); string qtdEstoque = GetQtdEmEstoque(valItemCode); ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C4").Cells.Item(pVal.Row).Specific).Value = qtdEstoque; ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C0").Cells.Item(pVal.Row).Specific).Value = valItemCode; ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C1").Cells.Item(pVal.Row).Specific).Value = valItemName; } catch (Exception ex) { } } else if (oCFLEvento.BeforeAction == false && sCFL_ID == "CFL2") { SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects; string valCarName = null; string idFornecedor = null; try { idFornecedor = System.Convert.ToString(oDataTable.GetValue(0, 0)); valCarName = System.Convert.ToString(oDataTable.GetValue(1, 0)); ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C6").Cells.Item(pVal.Row).Specific).Value = idFornecedor; ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C3").Cells.Item(pVal.Row).Specific).Value = valCarName; } catch (Exception ex) { } } } string coluna = pVal.ColUID; if (EventEnum == SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK && !pVal.BeforeAction) { //Anexo de arquivo if (coluna == "Ela_Amb_C7" || coluna == "Ela_Amb_C8" || coluna == "Ela_Amb_C9" || coluna == "Med_Amb_C1" || coluna == "Apv_Amb_C3" || coluna == "Ped_Amb_C7" || coluna == "Det_Amb_C7" || coluna == "Etg_Amb_C3" || coluna == "Mon_Amb_C3" || coluna == "Mon_Amb_C4" || coluna == "Mon_Amb_C5" || coluna == "Apv_Amb_C4" || coluna == "Ans_Amb_C0") { oNewItem = oForm.Items.Item(pVal.ItemUID); oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oEditItem = (SAPbouiCOM.EditText)oMatrix.Columns.Item(coluna).Cells.Item(pVal.Row).Specific; GridComAnexo(oEditItem); } //Url if (coluna == "Ped_Amb_C8" && ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Ped_Amb_C8").Cells.Item(pVal.Row).Specific).Value != "") { newProcess = new Process(); string valor = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Ped_Amb_C8").Cells.Item(pVal.Row).Specific).Value; info = new ProcessStartInfo(valor); newProcess.StartInfo = info; newProcess.Start(); } } if (EventEnum == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && !pVal.BeforeAction) { if (coluna == "Cmp_Amb_C2") { oNewItem = oForm.Items.Item("Det_Cmp"); oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); string qtd = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C2").Cells.Item(pVal.Row).Specific).String; decimal teste = Convert.ToDecimal(qtd); string estoque = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C4").Cells.Item(pVal.Row).Specific).String; decimal teste2 = Convert.ToDecimal(estoque); if (qtd != "" && teste > teste2) { SBO_Application.MessageBox("Sem ítens sufucintes no estoque"); } } } //Evento da grid de ambiente/análise crítica. if (!pVal.BeforeAction && pVal.ItemUID == "Apr_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "#" && pVal.Row > 0) { if (modificouAnsCritica) { SBO_Application.MessageBox("Vai atualizar"); Atualizar(); oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE; modificouAnsCritica = false; } //Instancia a matriz de ambiente da aba apresentação. oNewItem = oForm.Items.Item("Apr_Amb"); SAPbouiCOM.Matrix matrixApresentacao; matrixApresentacao = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); //Instancia a matriz de análise crítica da aba apresentação. oNewItem = oForm.Items.Item("Ans_Amb"); SAPbouiCOM.Matrix matrixAnaliseCritica; matrixAnaliseCritica = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); //Pega a coluna onde vai setar os valores pra o ambiente na matriz de análise crítica. oColumnsAnaliseCritica = matrixAnaliseCritica.Columns; oColumnAnaliseCritica = oColumnsAnaliseCritica.Item("Ans_Amb_C0"); //Pega o id do ambiente e a descrição do ambiente. oEditItem = (SAPbouiCOM.EditText)matrixApresentacao.Columns.Item("Apr_Amb_C2").Cells.Item(pVal.Row).Specific; SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixApresentacao.Columns.Item("Apr_Amb_C0").Cells.Item(pVal.Row).Specific; idAmbiente = int.Parse(oEditItem.String); string nomeGrid = oItemGrid.String; //Mostra na matriz de análise crítica qual ambiente selecionado. oColumnAnaliseCritica.TitleObject.Caption = "Analise Crítica (" + nomeGrid + ")"; LoadGridAnaliseCritica(); countMatrixAnaliseCriticaAntes = matrixAnaliseCritica.RowCount; if (matrixAnaliseCritica.RowCount == 0) { matrixAnaliseCritica.AddRow(1, 1); } } //Evento da grid de ambiente/análise crítica. if (!pVal.BeforeAction && pVal.ItemUID == "Ans_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Ans_Amb_C0" && pVal.CharPressed == 9) { oNewItem = oForm.Items.Item("Ans_Amb"); SAPbouiCOM.Matrix matrixAnaliseCritica; matrixAnaliseCritica = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oEditItem = (SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C0").Cells.Item(matrixAnaliseCritica.RowCount).Specific; string nome = oEditItem.String; if (matrixAnaliseCritica.RowCount > 0 && nome != "") { matrixAnaliseCritica.AddRow(1, matrixAnaliseCritica.RowCount + 1); ((SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C0").Cells.Item(matrixAnaliseCritica.RowCount).Specific).Value = ""; ((SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C1").Cells.Item(matrixAnaliseCritica.RowCount).Specific).Value = ""; } } if (pVal.ItemUID == "Ans_Amb" && pVal.ColUID == "Ans_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction) { SBO_Application.MessageBox("Teste"); modificouAnsCritica = true; } if (!pVal.BeforeAction && pVal.ItemUID == "Fab_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "Fab_#" && pVal.Row > 0) { if (bGravouAvarias) { SBO_Application.MessageBox("Vai atualizar Avarias"); Atualizar(); oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE; bGravouAvarias = false; } oNewItem = oForm.Items.Item("Fab_Amb"); SAPbouiCOM.Matrix matrixFabrica; matrixFabrica = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oNewItem = oForm.Items.Item("Ava_Amb"); SAPbouiCOM.Matrix matrixAvarias; matrixAvarias = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); SAPbouiCOM.Columns oColumnsAvarias = null; SAPbouiCOM.Column oColumnAvarias = null; oColumnsAvarias = matrixAvarias.Columns; oColumnAvarias = oColumnsAvarias.Item("Ava_Amb_C0"); //Pega o id do ambiente e a descrição do ambiente. oEditItem = (SAPbouiCOM.EditText)matrixFabrica.Columns.Item("Fab_Amb_C4").Cells.Item(pVal.Row).Specific; SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixFabrica.Columns.Item("Fab_Amb_C0").Cells.Item(pVal.Row).Specific; iRowAmbiente = int.Parse(oEditItem.String); string nomeGrid = oItemGrid.String; oColumnAvarias.TitleObject.Caption = "Descrição (" + nomeGrid + ")"; LoadGridAvarias(); countMatrixAvariasAntes = matrixAvarias.RowCount; if (matrixAvarias.RowCount == 0) { matrixAvarias.AddRow(1, 1); } } if (!pVal.BeforeAction && pVal.ItemUID == "Ava_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Ava_Amb_C0" && pVal.CharPressed == 9) { oNewItem = oForm.Items.Item("Ava_Amb"); SAPbouiCOM.Matrix matrixAvarias; matrixAvarias = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oEditItem = (SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C0").Cells.Item(matrixAvarias.RowCount).Specific; string nome = oEditItem.String; if (matrixAvarias.RowCount > 0 && nome != "") { matrixAvarias.AddRow(1, matrixAvarias.RowCount + 1); ((SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C0").Cells.Item(matrixAvarias.RowCount).Specific).Value = ""; ((SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C1").Cells.Item(matrixAvarias.RowCount).Specific).Value = ""; } } if (pVal.ItemUID == "Ava_Amb" && pVal.ColUID == "Ava_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction) { SBO_Application.MessageBox("Teste Avarias"); bGravouAvarias = true; } //Evento da grid de ambiente/conferência medições. if (!pVal.BeforeAction && pVal.ItemUID == "Med_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "#" && pVal.Row > 0) { //Instancia a matriz de ambiente da aba medições. oNewItem = oForm.Items.Item("Med_Amb"); SAPbouiCOM.Matrix matrixMedicoes; matrixMedicoes = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); //Instancia a matriz de conferência medições da aba medições. oNewItem = oForm.Items.Item("Med_Cnf"); SAPbouiCOM.Matrix matrixConferenciaMedicoes; matrixConferenciaMedicoes = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); //Pega a coluna onde vai setar os valores para o ambiente na matriz de conferência medições. oColumnsConferenciaMedicoes = matrixConferenciaMedicoes.Columns; oColumnConferenciaMedicoes = oColumnsConferenciaMedicoes.Item("med_Cnf_C1"); //Pega o id do ambiente e a descrição do ambiente. oEditItem = (SAPbouiCOM.EditText)matrixMedicoes.Columns.Item("Med_Amb_C2").Cells.Item(pVal.Row).Specific; SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixMedicoes.Columns.Item("Med_Amb_C0").Cells.Item(pVal.Row).Specific; iIdAmbienteMedicao = int.Parse(oEditItem.String); string nomeGrid = oItemGrid.String; //Mostra na matriz de conferência medições qual ambiente selecionado. oColumnConferenciaMedicoes.TitleObject.Caption = "Conferente (" + nomeGrid + ")"; LoadGridConferenciaMedicao(); countMatrixConfMedAntes = matrixConferenciaMedicoes.RowCount; if (matrixConferenciaMedicoes.RowCount == 0) { matrixConferenciaMedicoes.AddRow(1, 1); //Projetistas - Grid Conferencia de Medicao loadComboEmGrid("Med_Cnf", "med_Cnf_C1", projetistas); } } //Evento da grid de ambiente/conferência medições. if (pVal.CharPressed == 9 && !pVal.BeforeAction && pVal.ItemUID == "Med_Cnf" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "med_Cnf_C1") { oNewItem = oForm.Items.Item("Med_Cnf"); SAPbouiCOM.Matrix matrixConferenciaMedicao; matrixConferenciaMedicao = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oEditItem = (SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C0").Cells.Item(matrixConferenciaMedicao.RowCount).Specific; string data = oEditItem.String; SAPbouiCOM.ComboBox combo = (SAPbouiCOM.ComboBox)matrixConferenciaMedicao.Columns.Item("med_Cnf_C1").Cells.Item(matrixConferenciaMedicao.RowCount).Specific; string nome = combo.Value; if (matrixConferenciaMedicao.RowCount > 0 && data != "" && nome != "") { matrixConferenciaMedicao.AddRow(1, matrixConferenciaMedicao.RowCount + 1); ((SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C0").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Value = ""; //Projetistas - Grid Conferencia de Medicao RemoveValoresDeCombo(ref combo); loadComboEmGrid("Med_Cnf", "med_Cnf_C1", projetistas); ((SAPbouiCOM.ComboBox)matrixConferenciaMedicao.Columns.Item("med_Cnf_C1").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Select("", SAPbouiCOM.BoSearchKey.psk_ByValue); ((SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C2").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Value = ""; } } //Evento da grid de Entrega if (!pVal.BeforeAction && pVal.ItemUID == "Etg_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "Etg_#" && pVal.Row > 0) { if (modificouPendecia) { SBO_Application.MessageBox("Vai atualizar Pendencia"); Atualizar(); oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE; modificouPendecia = false; } //Instancia a matriz de ambiente da aba apresentação. oNewItem = oForm.Items.Item("Etg_Amb"); SAPbouiCOM.Matrix matrixEntrega; matrixEntrega = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); //Instancia a matriz de análise crítica da aba apresentação. oNewItem = oForm.Items.Item("Pen_Amb"); SAPbouiCOM.Matrix matrixPendencia; matrixPendencia = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); //Pega a coluna onde vai setar os valores pra o ambiente na matriz de Pendencia. oColumnsPendencia = matrixPendencia.Columns; oColumnPendencia = oColumnsPendencia.Item("Pen_Amb_C0"); //Pega o id do ambiente e a descrição do ambiente. oEditItem = (SAPbouiCOM.EditText)matrixEntrega.Columns.Item("Etg_Amb_C6").Cells.Item(pVal.Row).Specific; SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixEntrega.Columns.Item("Etg_Amb_C0").Cells.Item(pVal.Row).Specific; idAmbientePendencia = int.Parse(oEditItem.String); string nomeAmbiente = oItemGrid.String; //Mostra na matriz de Pendencia qual ambiente selecionado. oColumnPendencia.TitleObject.Caption = "Ambiente (" + nomeAmbiente + ")"; LoadGridPendencias(); countMatrixPendenciaAntes = matrixPendencia.RowCount; if (matrixPendencia.RowCount == 0) { matrixPendencia.AddRow(1, 1); } } //Evento da grid de ambiente/análise crítica. if (!pVal.BeforeAction && pVal.ItemUID == "Pen_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Pen_Amb_C0" && pVal.CharPressed == 9) { oNewItem = oForm.Items.Item("Pen_Amb"); SAPbouiCOM.Matrix matrixPendencia; matrixPendencia = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oEditItem = (SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C0").Cells.Item(matrixPendencia.RowCount).Specific; string nome = oEditItem.String; if (matrixPendencia.RowCount > 0 && nome != "") { matrixPendencia.AddRow(1, matrixPendencia.RowCount + 1); ((SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C0").Cells.Item(matrixPendencia.RowCount).Specific).Value = ""; ((SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C1").Cells.Item(matrixPendencia.RowCount).Specific).Value = ""; } } if (pVal.ItemUID == "Pen_Amb" && pVal.ColUID == "Pen_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction) { SBO_Application.MessageBox("Teste Pendencia"); modificouPendecia = true; } } if (pVal.FormType == 651) { if (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) { oFormAtual = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount); if (pVal.ItemUID == "Ata_Ativ" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED & !pVal.Before_Action) { abrirRelatorio("Ata de reuniao", oFormAtual.Items.Item("5").Specific.Value); } if (!pVal.Before_Action && (pVal.EventType == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "67")) { if (oFormAtual.Items.Item("67").Specific.Value == "M") { atividade.habilitaBotaoAta(); } else { atividade.desabilitaBotaoAta(); } } if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD) { if (pVal.Before_Action) { atividade = new Atividade(oFormAtual); } if (bBotaoAgendarFoiClicado) { oFormPai = SBO_Application.Forms.GetFormByTypeAndCount(320, iUltimoFormTypeCount_SalesOpportunities); sSalesOpportunities_Id = ((SAPbouiCOM.EditText)oFormPai.Items.Item("74").Specific).Value; sBPCode = ((SAPbouiCOM.EditText)oFormPai.Items.Item("9").Specific).Value; oFormAtual = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount); ((SAPbouiCOM.EditText)oFormAtual.Items.Item("9").Specific).Value = sBPCode; bBotaoAgendarFoiClicado = false; } } } } }
private void dtToMtProcess(System.Data.DataTable dtReportTwo) { SAPbouiCOM.Matrix mt = mtNote; System.Data.DataTable dt = dtReportTwo; int OldColCnt = mt.Columns.Count; dtNote.Rows.Clear(); mt.LoadFromDataSource(); oForm.Freeze(true); for (int i = 0; i < OldColCnt; i++) { mt.Columns.Remove(0); dtNote.Columns.Remove(0); } // add new colum with all dt Cols string colId = "col0"; SAPbouiCOM.DataColumn sboDc = dtNote.Columns.Add(colId, SAPbouiCOM.BoFieldsType.ft_Integer, 100); SAPbouiCOM.Column mCol = mt.Columns.Add(colId, SAPbouiCOM.BoFormItemTypes.it_EDIT); mCol.TitleObject.Caption = "#"; mCol.DataBind.Bind(dtNote.UniqueID, colId); mCol.Width = 20; mCol.Editable = false; mCol.RightJustified = true; // mCol.ColumnSetting.SumValue = "T"; int j = 1; foreach (System.Data.DataColumn dc in dt.Columns) { colId = "col" + j.ToString(); sboDc = dtNote.Columns.Add(colId, SAPbouiCOM.BoFieldsType.ft_AlphaNumeric, 100); mCol = mt.Columns.Add(colId, SAPbouiCOM.BoFormItemTypes.it_EDIT); mCol.TitleObject.Caption = dc.ColumnName; if (j == 1) { mCol.Width = 150; } else { mCol.Width = 80; } mCol.TitleObject.Sortable = true; mCol.Editable = false; mCol.DataBind.Bind(dtNote.UniqueID, colId); j++; } int row = 0; int col = 0; foreach (System.Data.DataRow dr in dt.Rows) { dtNote.Rows.Add(1); dtNote.SetValue("col0", row, (row + 1).ToString()); col = 1; foreach (System.Data.DataColumn dc in dt.Columns) { dtNote.SetValue("col" + col.ToString(), row, dr[dc.ColumnName]); col++; } row++; } int m = 1; // mt.LoadFromDataSource(); oForm.Freeze(false); // mt.LoadFromDataSource(); mt.LoadFromDataSource(); }
private void desenharCampos() { oItem = oForm.Items.Item("Grade"); oNewItem = oForm.Items.Add("Ela_Cot", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 30; oNewItem.Width = 150; oNewItem.Left = 730; oNewItem.Height = 19; oNewItem.FromPane = 11; oNewItem.ToPane = 11; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Gerar Orçamento..."; oNewItem = oForm.Items.Add("Ela_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 30; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 11; oNewItem.ToPane = 11; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Ambiente / Elaboração do projeto"; oNewItem = oForm.Items.Add("Ela_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 185; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 11; oNewItem.ToPane = 11; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Ambiente / Verificação do projeto"; oNewItem = oForm.Items.Add("Ela_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 880; oNewItem.Top = oItem.Top + 50; oNewItem.Height = 120; oNewItem.FromPane = 11; oNewItem.ToPane = 11; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("Ela_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Ela_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; /*oColumn = oColumns.Add("Ela_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX); * oColumn.TitleObject.Caption = "Revisão"; * oColumn.Width = 60; * oColumn.Editable = true;*/ oColumn = oColumns.Add("Ela_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Revisão"; oColumn.Width = 60; oColumn.Editable = true; oColumn = oColumns.Add("Ela_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Projetista"; oColumn.Width = 100; oColumn.Editable = true; oColumn.DisplayDesc = true; oColumn = oColumns.Add("Ela_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Início Prev"; oColumn.Width = 90; oColumn.Editable = true; oColumn = oColumns.Add("Ela_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Término Prev"; oColumn.Width = 90; oColumn.Editable = true; //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS"); oColumn = oColumns.Add("Ela_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Início Realiz"; oColumn.Width = 90; oColumn.Editable = true; //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS"); oColumn = oColumns.Add("Ela_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Término Realiz"; oColumn.Width = 90; oColumn.Editable = true; //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS"); oColumn = oColumns.Add("Ela_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Arquivos CAD"; oColumn.Width = 120; oColumn.Editable = true; //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS"); oColumn = oColumns.Add("Ela_Amb_C8", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Arquivos PRJ"; oColumn.Width = 120; oColumn.Editable = true; //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS"); oColumn = oColumns.Add("Ela_Amb_C9", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Arquivos JPG"; oColumn.Width = 120; oColumn.Editable = true; //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS"); oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Ela_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Ela_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_REVISAO"); oColumn = oColumns.Item("Ela_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_PROJETI"); oColumn = oColumns.Item("Ela_Amb_C3"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_INICIOP"); oColumn = oColumns.Item("Ela_Amb_C4"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_TERMINP"); oColumn = oColumns.Item("Ela_Amb_C5"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_INICIOR"); oColumn = oColumns.Item("Ela_Amb_C6"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_TERMINR"); oColumn = oColumns.Item("Ela_Amb_C7"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_ARQCAD"); oColumn = oColumns.Item("Ela_Amb_C8"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_ARQPRJ"); oColumn = oColumns.Item("Ela_Amb_C9"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_ARQJPG"); }
private void CreateePaymentFormForm() { try { ManualScan = "0"; SAPbouiCOM.Item oItem = null; SAPbouiCOM.Button oButton = null; //SAPbouiCOM.StaticText oStaticText = null; // SAPbouiCOM.EditText oEditText = null; //SAPbouiCOM.ComboBox oComboBox = null; // add a new form SAPbouiCOM.FormCreationParams oCreationParams = null; oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams))); oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed; oCreationParams.FormType = formePaymentForm; oCreationParams.UniqueID = formePaymentForm; try { oePaymentFormForm = SBO_Application.Forms.AddEx(oCreationParams); } catch (Exception) { oePaymentFormForm = SBO_Application.Forms.Item(formePaymentForm); } // set the form properties oePaymentFormForm.Title = "eBizCharge ePayment Form"; oePaymentFormForm.Left = 400; oePaymentFormForm.Top = 100; oePaymentFormForm.ClientHeight = 460; oePaymentFormForm.ClientWidth = 900; //************************ // Adding a Rectangle //*********************** int margin = 5; oItem = oePaymentFormForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE); oItem.Left = margin; oItem.Width = oePaymentFormForm.ClientWidth - 2 * margin; oItem.Top = margin; oItem.Height = oePaymentFormForm.ClientHeight - 40; int nTopGap = 25; int left = 6; int wBtn = 70; int hBtn = 19; int span = 80; oItem = oePaymentFormForm.Items.Add(btnRefresh, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oePaymentFormForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Refresh"; left += span; oItem = oePaymentFormForm.Items.Add(btnAdd, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oePaymentFormForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Send All"; left += span; /* * oItem = oePaymentFormForm.Items.Add(btnRun, SAPbouiCOM.BoFormItemTypes.it_BUTTON); * oItem.Left = left; * oItem.Width = wBtn; * oItem.Top = oePaymentFormForm.ClientHeight - nTopGap; * oItem.Height = hBtn; * * oButton = ((SAPbouiCOM.Button)(oItem.Specific)); * * oButton.Caption = "Run"; * * left += span; */ oItem = oePaymentFormForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oePaymentFormForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Cancel"; margin = 8; int top = 15; int edL = 100; //oItm.Left + oItm.Width; int edW = 100; int edH = 15; int nGap = 26; oItem = addPaneItem(oePaymentFormForm, editCustomerID, edL, top, edW, edH, "Customer ID:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1000, 80); oItem = addPaneItem(oePaymentFormForm, cbCustomerID, edL + 110, top, edW, edH, "", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 1000); oItem = oePaymentFormForm.Items.Add(btnFind, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = edL + 220; oItem.Width = wBtn; oItem.Top = top - 2; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Find"; oItem = addPaneItem(oePaymentFormForm, cbGroup, edL + 400, top, edW, edH, "Customer Group", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 1030); SAPbouiCOM.ComboBox oCB = (SAPbouiCOM.ComboBox)oItem.Specific; ComboAddItem(oCB, ""); ComboAddItem(oCB, "All"); List <string> list = GetGroupNames(); foreach (string c in list) { ComboAddItem(oCB, c); } oItem = addPaneItem(oePaymentFormForm, cbEMTemplate, edL + 640, top, edW, edH, "Email Template", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 1060); oCB = (SAPbouiCOM.ComboBox)oItem.Specific; foreach (string s in ListEmailTemplate) { ComboAddItem(oCB, s); } string t = getDefaultEmailTemplate(); if (t != "") { try { oCB.Select(t); }catch (Exception) { try { oCB.Select(0); } catch (Exception) { }; } } else { try { oCB.Select(0); } catch (Exception) { }; } top = oItem.Top + nGap; oItem = oePaymentFormForm.Items.Add(matrixePaymentForm, SAPbouiCOM.BoFormItemTypes.it_MATRIX); oItem.FromPane = 0; oItem.ToPane = 0; oItem.Left = 5 + margin; oItem.Width = oePaymentFormForm.ClientWidth - 2 * margin - 10; oItem.Top = top; oItem.Height = oePaymentFormForm.ClientHeight - 100; top = oItem.Height + oItem.Top + 2; SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oePaymentFormForm.Items.Item(matrixePaymentForm).Specific; oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; SAPbouiCOM.Column oColumn = oMatrix.Columns.Add("DocNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Invoice No."; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("Status", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Status"; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("CustID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Customer"; oColumn.Width = 80; SAPbouiCOM.LinkedButton btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_BusinessPartner).ToString(); oColumn = oMatrix.Columns.Add("CName", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Customer Name"; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("E_Mail", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "EMail"; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("InvID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Origin No."; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Invoice).ToString(); oColumn.Width = 80; oColumn = oMatrix.Columns.Add("UploadDT", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Sent Date"; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("PaidDT", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Payment Date"; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("Balance", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Balance"; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("UpBal", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Balance Sented"; oColumn.Width = 80; oColumn = oMatrix.Columns.Add("AmtPaid", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Last ePayment"; oColumn.Width = 80; // populateePaymentFormMatrix(); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single; } catch (Exception ex) { errorLog(ex); } oePaymentFormForm.Visible = true; }
private void AddChooseFromList()//aqui break point { lObjFormXml.DataSources.UserDataSources.Add("UDCFL", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); string Cbx = lObjComboBox.Value.Trim(); try { SAPbouiCOM.ChooseFromListCollection oCFLs = null; SAPbouiCOM.Conditions oCons = null; SAPbouiCOM.Condition oCon = null; SAPbouiCOM.Column oColumn = null; oCFLs = lObjFormXml.ChooseFromLists; SAPbouiCOM.ChooseFromListCreationParams lObjCFLCreationParams = null; lObjCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)SAPbouiCOM.Framework.Application.SBO_Application.CreateObject (SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams); // Adding 2 CFL, one for the button and one for the edit text. //string strCFLID = oCFLCreationParams.UniqueID lObjCFLCreationParams.MultiSelection = false; if (lStrDocType.Equals("Servicios")) { lObjCFLCreationParams.ObjectType = "1"; } else { lObjCFLCreationParams.ObjectType = "4"; } lObjCFLCreationParams.UniqueID = "CFLACT"; pObjChooseFromList = oCFLs.Add(lObjCFLCreationParams); // Adding Conditions to CFL1 oCons = pObjChooseFromList.GetConditions(); //Onlu Postable Accounts if (lStrDocType.Equals("Servicios") && lStrFormType != "65301") { if (Cbx == "MXP") { #region MXP oCon = oCons.Add(); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "EUR"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "USD"; #endregion } else if (Cbx == "USD") { #region USD oCon = oCons.Add(); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "EUR"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "MXP"; #endregion } else if (Cbx == "EUR") { #region EUR oCon = oCons.Add(); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "USD"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "MXP"; #endregion } } else if (lStrDocType.Equals("Servicios") && lStrFormType == "65301") { #region advances to suppliers oCon = oCons.Add(); oCon.Alias = "AcctCode"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "11410000"; #endregion } else { oCon = oCons.Add(); oCon.Alias = "validFor"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; } pObjChooseFromList.SetConditions(oCons); if (oMatrix.RowCount > 0) { for (int i = oMatrix.RowCount; i >= 1; i--) { if (oMatrix.RowCount == 1) { oMatrix.ClearRowData(i); oMatrix.DeleteRow(i); } else { oMatrix.DeleteRow(i); } } } oColumn = oMatrix.Columns.Item("Col_0"); try { oColumn.DataBind.SetBound(true, "", "UDCFL"); } catch (Exception) { } oColumn.ChooseFromListUID = pObjChooseFromList.UniqueID; if (lStrDocType.Equals("Servicios")) { oColumn.ChooseFromListAlias = "AcctCode"; } else { oColumn.ChooseFromListAlias = "ItemCode"; } } catch (Exception ex) { SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(string.Format("InitCustomerChooseFromListException: {0}", ex.Message)); } }
private void CreateRBillingForm() { try { ManualScan = "0"; SAPbouiCOM.Item oItem = null; SAPbouiCOM.Button oButton = null; //SAPbouiCOM.StaticText oStaticText = null; // SAPbouiCOM.EditText oEditText = null; //SAPbouiCOM.ComboBox oComboBox = null; // add a new form SAPbouiCOM.FormCreationParams oCreationParams = null; oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams))); oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed; oCreationParams.FormType = formRBilling; oCreationParams.UniqueID = formRBilling; try { oRBillingForm = SBO_Application.Forms.AddEx(oCreationParams); } catch (Exception) { oRBillingForm = SBO_Application.Forms.Item(formRBilling); } // set the form properties oRBillingForm.Title = "eBizCharge Recurring Billing"; oRBillingForm.Left = 400; oRBillingForm.Top = 100; oRBillingForm.ClientHeight = 460; oRBillingForm.ClientWidth = 975; //************************ // Adding a Rectangle //*********************** int margin = 5; oItem = oRBillingForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE); oItem.Left = margin; oItem.Width = oRBillingForm.ClientWidth - 2 * margin; oItem.Top = margin; oItem.Height = oRBillingForm.ClientHeight - 40; int nTopGap = 25; int left = 6; int wBtn = 70; int hBtn = 19; int span = 80; oItem = oRBillingForm.Items.Add(btnRefresh, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oRBillingForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Refresh"; left += span; oItem = oRBillingForm.Items.Add(btnAdd, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oRBillingForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Add"; left += span; oItem = oRBillingForm.Items.Add(btnRun, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oRBillingForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Run"; left += span; oItem = oRBillingForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = left; oItem.Width = wBtn; oItem.Top = oRBillingForm.ClientHeight - nTopGap; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Cancel"; margin = 8; int top = 15; int edL = 150; //oItm.Left + oItm.Width; int edW = 100; int edH = 15; int nGap = 26; oItem = addPaneItem(oRBillingForm, editCustomerID, edL, top, edW, edH, "Customer ID:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1000); oItem = addPaneItem(oRBillingForm, cbCustomerID, edL + 110, top, edW, edH, "", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 1000); oItem = oRBillingForm.Items.Add(btnFind, SAPbouiCOM.BoFormItemTypes.it_BUTTON); oItem.Left = edL + 220; oItem.Width = wBtn; oItem.Top = top - 2; oItem.Height = hBtn; oButton = ((SAPbouiCOM.Button)(oItem.Specific)); oButton.Caption = "Find"; top = oItem.Top + nGap; oItem = oRBillingForm.Items.Add(matrixRBilling, SAPbouiCOM.BoFormItemTypes.it_MATRIX); oItem.FromPane = 0; oItem.ToPane = 0; oItem.Left = 5 + margin; oItem.Width = oRBillingForm.ClientWidth - 2 * margin - 10; oItem.Top = top; oItem.Height = oRBillingForm.ClientHeight - 100; top = oItem.Height + oItem.Top + 2; SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oRBillingForm.Items.Item(matrixRBilling).Specific; SAPbouiCOM.Column oColumn = oMatrix.Columns.Add("jobID", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "ID"; oColumn.Width = 20; oColumn = oMatrix.Columns.Add("CustName", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Name"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("CustomerID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Customer"; oColumn.Width = 80; SAPbouiCOM.LinkedButton btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_BusinessPartner).ToString(); oColumn = oMatrix.Columns.Add("InvID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Invoice"; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Invoice).ToString(); oColumn.Width = 40; oColumn = oMatrix.Columns.Add("OrderID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Order"; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Order).ToString(); oColumn.Width = 40; oColumn = oMatrix.Columns.Add("Frequency", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Frequency"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("StartDate", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Start Date"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("EndDate", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "End Date"; oColumn.Width = 50; /* * oColumn = oMatrix.Columns.Add("CancelDate", SAPbouiCOM.BoFormItemTypes.it_EDIT); * oColumn.TitleObject.Caption = "Cancel Date"; * oColumn.Width =50; */ oColumn = oMatrix.Columns.Add("NextRun", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Next Run"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("Amount", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Amount"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("Desc", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Description"; oColumn.Width = 200; oColumn = oMatrix.Columns.Add("LastRun", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Last Run"; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("Result", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Result"; oColumn.Width = 200; populateRBillingMatrix(); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single; } catch (Exception ex) { errorLog(ex); } oRBillingForm.Visible = true; }
private void desenharCampos() { oItem = oForm.Items.Item("Grade"); oNewItem = oForm.Items.Add("Det_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 30; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 14; oNewItem.ToPane = 14; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Ambiente / Detalhamento do Projeto"; oNewItem = oForm.Items.Add("Det_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 185; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 14; oNewItem.ToPane = 14; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Itens Complementares"; oNewItem = oForm.Items.Add("Det_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 860; oNewItem.Top = oItem.Top + 50; oNewItem.Height = 120; oNewItem.FromPane = 14; oNewItem.ToPane = 14; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("Det_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Det_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; oColumn = oColumns.Add("Det_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Projetista"; oColumn.Width = 120; oColumn.Editable = true; oColumn.DisplayDesc = true; //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_ENT_PENDENC"); oColumn = oColumns.Add("Det_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Início Previsto"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Det_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Término Previsto"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Det_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Início Realizado"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Det_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Término Realzado"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Det_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "PDFs Detalhamento"; oColumn.Width = 200; oColumn.Editable = true; oColumn.DataBind.SetBound(true, "@FLX_FB_CONFMED", "U_FLX_FB_CONFMED_PRJ"); oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Det_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Det_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_PROJETI"); oColumn = oColumns.Item("Det_Amb_C3"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_INICIOP"); oColumn = oColumns.Item("Det_Amb_C4"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_TERMINP"); oColumn = oColumns.Item("Det_Amb_C5"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_INICIRE"); oColumn = oColumns.Item("Det_Amb_C6"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_TERMINO"); oColumn = oColumns.Item("Det_Amb_C7"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_PDF"); oNewItem = oForm.Items.Add("Det_Cmp", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 880; oNewItem.Top = oItem.Top + 205; oNewItem.Height = 120; oNewItem.FromPane = 14; oNewItem.ToPane = 14; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("Cmp_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Cmp_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Item"; oColumn.Width = 40; oColumn.Editable = false; oColumn = oColumns.Add("Cmp_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Descrição"; oColumn.Width = 200; oColumn.Editable = true; oColumn.DataBind.SetBound(true, "", "dt"); oColumn.ChooseFromListUID = "CFL1"; oColumn.ChooseFromListAlias = "ItemName"; oColumn = oColumns.Add("Cmp_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Estoque"; oColumn.Width = 70; oColumn.Editable = false; oColumn = oColumns.Add("Cmp_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Qtd"; oColumn.Width = 40; oColumn.Editable = true; oColumn = oColumns.Add("Cmp_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "IdFornecedor"; oColumn.Width = 40; oColumn.Editable = false; oColumn.Visible = false; oColumn = oColumns.Add("Cmp_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Fornecedor"; oColumn.Width = 150; oColumn.Editable = true; oColumn.DataBind.SetBound(true, "", "dt"); oColumn.ChooseFromListUID = "CFL2"; oColumn.ChooseFromListAlias = "CardName"; oColumn = oColumns.Add("Cmp_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Observação"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Cmp_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "id"; oColumn.Width = 120; oColumn.Editable = true; oColumn.Visible = false; oForm.DataSources.DataTables.Add("oDataTableItc"); oForm.DataSources.DataTables.Item("oDataTableItc").ExecuteQuery("select T1.ItemCode, T1.ItemName, T1.OnHand, T0.U_FLX_FB_ITC_QTD, T2.CardCode, T2.CardName, T0.U_FLX_FB_ITC_OBS, T0.Code from [@FLX_FB_ITC] T0 inner join OITM T1 on T1.ItemCode = T0.U_FLX_FB_ITC_IDOITM inner join OCRD T2 on T2.CardCode = T0.U_FLX_FB_ITC_IDOCRD where T0.U_FLX_FB_ITC_IDOOPR = '1'"); oColumn = oColumns.Item("Cmp_Amb_C0"); oColumn.DataBind.Bind("oDataTableItc", "ItemCode"); oColumn = oColumns.Item("Cmp_Amb_C1"); oColumn.DataBind.Bind("oDataTableItc", "ItemName"); oColumn = oColumns.Item("Cmp_Amb_C4"); oColumn.DataBind.Bind("oDataTableItc", "OnHand"); oColumn = oColumns.Item("Cmp_Amb_C2"); oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_QTD"); oColumn = oColumns.Item("Cmp_Amb_C6"); oColumn.DataBind.Bind("oDataTableItc", "CardCode"); oColumn = oColumns.Item("Cmp_Amb_C3"); oColumn.DataBind.Bind("oDataTableItc", "CardName"); oColumn = oColumns.Item("Cmp_Amb_C5"); oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_OBS"); oColumn = oColumns.Item("Cmp_Amb_C7"); oColumn.DataBind.Bind("oDataTableItc", "Code"); }
private void desenharCampos() { oItem = oForm.Items.Item("7"); oNewItem = oForm.Items.Add("Med_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 110; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Ambiente / Levantamento"; oNewItem = oForm.Items.Add("Med_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 270; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Conferências de Medições"; oNewItem = oForm.Items.Add("Med_Text2a", SAPbouiCOM.BoFormItemTypes.it_STATIC); oItem = oForm.Items.Item("Grade"); oNewItem.Top = oItem.Top + 17; oNewItem.Height = 19; oNewItem.Width = 400; oNewItem.Left = 25; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Data"; oNewItem = oForm.Items.Add("Med_Text2b", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 17; oNewItem.Height = 19; oNewItem.Width = 400; oNewItem.Left = 120; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Hora"; oNewItem = oForm.Items.Add("Med_Text2c", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 17; oNewItem.Height = 19; oNewItem.Width = 400; oNewItem.Left = 175; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Projetista"; // Comentado campos de ligação com a tabela a partir daqui DBDSflx = oForm.DataSources.DBDataSources.Add("@FLX_FB_MED"); oNewItem = oForm.Items.Add("Med_Data", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 35; oNewItem.Height = 17; oNewItem.Width = 80; oNewItem.Left = 25; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_MED_DATEMED"); oNewItem = oForm.Items.Add("Med_Hora", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 35; oNewItem.Height = 17; oNewItem.Width = 40; oNewItem.Left = 120; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_MED_HORAMED"); oNewItem = oForm.Items.Add("Med_Proj", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oNewItem.Top = oItem.Top + 35; oNewItem.Height = 17; oNewItem.Width = 140; oNewItem.Left = 175; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oNewItem.DisplayDesc = true; oComboItem = ((SAPbouiCOM.ComboBox)(oNewItem.Specific)); DBDSflx = oForm.DataSources.DBDataSources.Add("@FLX_FB_CONFMED"); oNewItem = oForm.Items.Add("Med_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 500; oNewItem.Top = oItem.Top + 85; oNewItem.Height = 110; oNewItem.FromPane = 10; oNewItem.ToPane = 10; //SBO_Application.MessageBox("PASSO 14", 1, "Ok", "", ""); oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; oColumns = oMatrix.Columns; oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Med_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 60; oColumn.Editable = false; oColumn = oColumns.Add("Med_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Levantamento (anexos)"; oColumn.Width = 140; oColumn.Editable = true; oColumn.DataBind.SetBound(true, "@FLX_FB_CONFMED", "U_FLX_FB_CONFMED_PRJ"); oColumn = oColumns.Add("Med_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "IdAmbiente"; oColumn.Width = 80; oColumn.Editable = true; oColumn.Visible = false; oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery( "SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 " + "INNER JOIN OOIN T1 ON T1.Num = T0.IntId " + "WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Med_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Med_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MED_LEVANTA"); oColumn = oColumns.Item("Med_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "Line"); oMatrix.LoadFromDataSource(); oNewItem = oForm.Items.Add("NvLev", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 210; oNewItem.Width = 180; oNewItem.Left = 400; oNewItem.Height = 19; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Novo levantamento"; oNewItem = oForm.Items.Add("Med_Cnf", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 300; oNewItem.Top = oItem.Top + 250; oNewItem.Height = 110; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; oColumns = oMatrix.Columns; oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Med_Cnf_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Data"; oColumn.Width = 80; oColumn.Editable = true; oColumn = oColumns.Add("med_Cnf_C1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Conferente"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Med_Cnf_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Id"; oColumn.Width = 100; oColumn.Editable = true; oColumn.Visible = false; oNewItem = oForm.Items.Add("Med_Age", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 35; oNewItem.Width = 80; oNewItem.Left = 430; oNewItem.Height = 19; oNewItem.FromPane = 10; oNewItem.ToPane = 10; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Agendar"; oForm.DataSources.DataTables.Add("oDataTable"); oForm.DataSources.DataTables.Item("oDataTable").ExecuteQuery("select * from [@FLX_FB_CONFMED] where U_FLX_FB_CONFMED_ID = '1'"); oColumn = oColumns.Item("Med_Cnf_C0"); oColumn.DataBind.Bind("oDataTable", "U_FLX_FB_CONFMED_DAT"); oColumn = oColumns.Item("med_Cnf_C1"); oColumn.DataBind.Bind("oDataTable", "U_FLX_FB_CONFMED_PRJ"); oColumn = oColumns.Item("Med_Cnf_C2"); oColumn.DataBind.Bind("oDataTable", "Code"); }
private void ChangeChooseFromList() { string Cbx = lObjComboBox.Value.Trim(); try { oCFLs = lObjFormXml.ChooseFromLists; pObjChooseFromList = (SAPbouiCOM.ChooseFromList)oCFLs.Item("CFLACT"); // Adding Conditions to CFL1 oCons = pObjChooseFromList.GetConditions(); //Condicion para filtrar solo cuentas afectables if (lStrDocType.Equals("Servicios") && lStrFormType != "65301") { if (Cbx == "MXP") { #region Moneda nacional oCon = oCons.Item(0); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(1); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(2); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "EUR"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(3); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "USD"; #endregion } else if (Cbx == "USD") { #region Dolares oCon = oCons.Item(0); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(1); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(2); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "EUR"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(3); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "MXP"; #endregion } else if (Cbx == "EUR") { #region Euros oCon = oCons.Item(0); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(1); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(2); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "USD"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Item(3); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "MXP"; #endregion } } pObjChooseFromList.SetConditions(oCons); if (oMatrix.RowCount > 0) { for (int i = oMatrix.RowCount; i >= 1; i--) { if (oMatrix.RowCount == 1) { oMatrix.ClearRowData(i); oMatrix.DeleteRow(i); } else { oMatrix.DeleteRow(i); } } } oColumn = oMatrix.Columns.Item("Col_0"); oColumn.DataBind.SetBound(true, "", "UDCFL"); oColumn.ChooseFromListUID = pObjChooseFromList.UniqueID; if (lStrDocType.Equals("Servicios")) { oColumn.ChooseFromListAlias = "AcctCode"; } else { oColumn.ChooseFromListAlias = "ItemCode"; } } catch (Exception err) { Console.WriteLine(err.Message + err.StackTrace); } }
private void desenharCampos() { oItem = oForm.Items.Item("7"); oNewItem = oForm.Items.Add("Ped_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 880; oNewItem.Top = oItem.Top + 50; oNewItem.Height = 120; oNewItem.FromPane = 13; oNewItem.ToPane = 13; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("Ped_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Ped_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; oColumn = oColumns.Add("Ped_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Data Pedido"; oColumn.Width = 80; oColumn.Editable = true; oColumn = oColumns.Add("Ped_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "No.Pedido"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Ped_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ordem de Compra"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Ped_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Valor"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Ped_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Solicitante"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Ped_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Prazo Entrega"; oColumn.Width = 80; oColumn.Editable = true; oColumn = oColumns.Add("Ped_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Anexo (pedido impresso)"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Ped_Amb_C8", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "URL"; oColumn.Width = 100; oColumn.Editable = true; oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Ped_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Ped_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_DATE"); oColumn = oColumns.Item("Ped_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_NPEDIDO"); oColumn = oColumns.Item("Ped_Amb_C3"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_ORDENDE"); oColumn = oColumns.Item("Ped_Amb_C4"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_VALOR"); oColumn = oColumns.Item("Ped_Amb_C5"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_SOLICIT"); oColumn = oColumns.Item("Ped_Amb_C6"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_PRAZOEN"); oColumn = oColumns.Item("Ped_Amb_C7"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_ANEXOPE"); oColumn = oColumns.Item("Ped_Amb_C8"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_URL"); }
private void AddCCLogMatrix(SAPbouiCOM.Form form, int pane, int top = 0) { try { SAPbouiCOM.Item oItem = form.Items.Add(H_CUSTOMERID, SAPbouiCOM.BoFormItemTypes.it_EDIT); oItem.FromPane = 1000; oItem.ToPane = 1000; oItem.AffectsFormMode = false; oItem = form.Items.Add(H_RECORDID, SAPbouiCOM.BoFormItemTypes.it_EDIT); oItem.FromPane = 1000; oItem.ToPane = 1000; oItem.AffectsFormMode = false; oItem = form.Items.Item("4"); if (form.TypeEx == FORMBPARTNER) { oItem = form.Items.Item("7"); } SAPbouiCOM.Item oItemRef = form.Items.Item(tbCreditCard); int edW = oItem.Width; int edT = oItemRef.Top + top + oItemRef.Height + 10; int edL = 20 + oItem.Width; oItem = addPaneItem(form, editEmail, edL, edT, edW, oItem.Height, "Receipt email:", SAPbouiCOM.BoFormItemTypes.it_EDIT, pane, 19877); edT = edT + oItem.Height + 2; oItem = form.Items.Add(mxtCCLog, SAPbouiCOM.BoFormItemTypes.it_MATRIX); oItem.FromPane = pane; oItem.ToPane = pane; oItem.AffectsFormMode = false; oItem.Top = edT; oItem.Left = 20; oItem.Height = form.ClientHeight / 3; oItem.Width = form.ClientWidth - 60; SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)form.Items.Item(mxtCCLog).Specific; SAPbouiCOM.Column oColumn = oMatrix.Columns.Add("RefNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ref. No."; oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("PaymentID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = ""; SAPbouiCOM.LinkedButton btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_JournalPosting).ToString(); oColumn.Width = 0; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("OrderID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Order"; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Order).ToString(); oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("OrderNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Order No."; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("InvoiceID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Invoice"; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Invoice).ToString(); oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("InvoiceNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Invoice No."; oColumn.Width = 50; oColumn = oMatrix.Columns.Add("CMID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON); oColumn.TitleObject.Caption = "Credit Memo"; btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject; btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_InvoiceCreditMemo).ToString(); oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("command", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Command"; oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("Amount", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Amount"; oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("Desc", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Description"; oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("CardHolder", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Card Holder"; oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("crCardNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Card No."; oColumn.Width = 50; oColumn.AffectsFormMode = false; /* * oColumn = oMatrix.Columns.Add("result", SAPbouiCOM.BoFormItemTypes.it_EDIT); * oColumn.TitleObject.Caption = "Result"; * oColumn.Width = 50; */ oColumn = oMatrix.Columns.Add("error", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Result"; oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("avs", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "AVS"; oColumn.Width = 150; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("CardCode", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Card Code"; oColumn.Width = 150; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("CardLevel", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Card Level"; oColumn.Width = 150; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("custNum", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Customer Number"; oColumn.Width = 50; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("CCAID", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Credit Card"; oColumn.Width = 0; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("recdate", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Process Date"; oColumn.Width = 100; oColumn.AffectsFormMode = false; oColumn = oMatrix.Columns.Add("ccTRANSID", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "ID"; oColumn.Width = 10; oColumn.AffectsFormMode = false; oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single; //populateLog(form); } catch (Exception ex) { errorLog(ex); } }
private void desenharCampos() { oItem = oForm.Items.Item("7"); oNewItem = oForm.Items.Add("Etg_TextY", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 60; oNewItem.Height = 19; oNewItem.Width = 150; oNewItem.Left = 25; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Declaração de conformidade: "; oNewItem = oForm.Items.Add("Etg_Dec_An", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 60; oNewItem.Height = 17; oNewItem.Width = 250; oNewItem.Left = 170; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_ENT_DECLARA"); oNewItem = oForm.Items.Add("Etg_Decl", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 60; oNewItem.Width = 180; oNewItem.Left = 430; oNewItem.Height = 20; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Nova declaração de conformidade"; /////////////////////////////////////////// oNewItem = oForm.Items.Add("Etg_Text2", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 85; oNewItem.Height = 19; oNewItem.Width = 150; oNewItem.Left = 25; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Pesquisa de satisfação: "; oNewItem = oForm.Items.Add("Etg_Pesqu", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 85; oNewItem.Height = 17; oNewItem.Width = 250; oNewItem.Left = 170; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_ENT_PESQUIS"); oNewItem = oForm.Items.Add("Etg_Pq", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 85; oNewItem.Width = 180; oNewItem.Left = 430; oNewItem.Height = 20; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Nova pesquisa de satisfação"; ///////////////////////////////////////////////////// oNewItem = oForm.Items.Add("Etg_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 105; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Ambiente / Entrega"; oNewItem = oForm.Items.Add("Etg_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 580; oNewItem.Top = oItem.Top + 125; oNewItem.Height = 120; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; oColumns = oMatrix.Columns; oColumn = oColumns.Add("Etg_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Etg_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; oColumn = oColumns.Add("Etg_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Entrega"; oColumn.Width = 80; oColumn.Editable = true; oColumn = oColumns.Add("Etg_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Responsável"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Etg_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Laudo de Entrega"; oColumn.Width = 80; oColumn.Editable = true; oColumn = oColumns.Add("Etg_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Data p/Solução"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Etg_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX); oColumn.TitleObject.Caption = "Resolvido"; oColumn.Width = 80; oColumn.Editable = true; oColumn.DisplayDesc = true; oColumn.ValOn = "1"; oColumn.ValOff = "0"; oColumn = oColumns.Add("Etg_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Id Ambiente"; oColumn.Width = 30; oColumn.Editable = true; oColumn.Visible = false; oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Etg_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Etg_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_ENTREGA"); oColumn = oColumns.Item("Etg_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_RESPONS"); oColumn = oColumns.Item("Etg_Amb_C3"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_LAUDO"); oColumn = oColumns.Item("Etg_Amb_C4"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_DATASOL"); oColumn = oColumns.Item("Etg_Amb_C5"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_RESOLVI"); oColumn = oColumns.Item("Etg_Amb_C6"); oColumn.DataBind.Bind("oMatrixDT", "Line"); ///////////////////////////// //Botao Nova vistoria de entrega oNewItem = oForm.Items.Add("Laudo_Ent", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 125; oNewItem.Width = 200; oNewItem.Left = oForm.Width - 250; oNewItem.Height = 25; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Novo laudo de vistoria de entrega"; oNewItem = oForm.Items.Add("Etg_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 265; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Registro de Pendências"; oNewItem = oForm.Items.Add("Pen_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 880; oNewItem.Top = oItem.Top + 285; oNewItem.Height = 120; oNewItem.FromPane = 17; oNewItem.ToPane = 17; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("Pen_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Pen_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Descrição"; oColumn.Width = 600; oColumn.Editable = true; oColumn = oColumns.Add("Pen_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Code"; oColumn.Width = 50; oColumn.Editable = false; oColumn.Visible = false; oForm.DataSources.DataTables.Add("oDataTablePend"); oForm.DataSources.DataTables.Item("oDataTablePend").ExecuteQuery("select * from [@FLX_FB_PEN] where U_FLX_FB_PEN_IDOOPR = '1' and U_FLX_FB_PEN_IDAMB = '1'"); oColumn = oColumns.Item("Pen_Amb_C0"); oColumn.DataBind.Bind("oDataTablePend", "U_FLX_FB_PEN_DESC"); oColumn = oColumns.Item("Pen_Amb_C1"); oColumn.DataBind.Bind("oDataTablePend", "Code"); }
private void desenharCampos() { oItem = oForm.Items.Item("Grade"); oNewItem = oForm.Items.Add("Fab_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 30; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 15; oNewItem.ToPane = 15; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Recebimento dos Ambientes"; oNewItem = oForm.Items.Add("Fab_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 185; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 15; oNewItem.ToPane = 15; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Registro de Avarias"; oNewItem = oForm.Items.Add("Fab_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 480; oNewItem.Top = oItem.Top + 50; oNewItem.Height = 120; oNewItem.FromPane = 15; oNewItem.ToPane = 15; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; oColumns = oMatrix.Columns; oColumn = oColumns.Add("Fab_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Fab_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; /*oColumn = oColumns.Add("Fab_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX); * oColumn.TitleObject.Caption = "Expedição"; * oColumn.Width = 80; * oColumn.Editable = true;*/ oColumn = oColumns.Add("Fab_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Expedição"; oColumn.Width = 80; oColumn.Editable = true; /*oColumn = oColumns.Add("Fab_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); * oColumn.TitleObject.Caption = "Recebimento"; * oColumn.Width = 80; * oColumn.Editable = true;*/ oColumn = oColumns.Add("Fab_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Recebimento"; oColumn.Width = 80; oColumn.Editable = true; oColumn = oColumns.Add("Fab_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Conferente"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Fab_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "IdAmbiente"; oColumn.Width = 80; oColumn.Editable = true; oColumn.Visible = false; oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery( "SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 " + "INNER JOIN OOIN T1 ON T1.Num = T0.IntId " + "WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Fab_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Fab_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_FAB_EXPEDIC"); oColumn = oColumns.Item("Fab_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_FAB_RECEBIM"); oColumn = oColumns.Item("Fab_Amb_C3"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_FAB_CONFERE"); oColumn = oColumns.Item("Fab_Amb_C4"); oColumn.DataBind.Bind("oMatrixDT", "Line"); oNewItem = oForm.Items.Add("Ava_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 680; oNewItem.Top = oItem.Top + 205; oNewItem.Height = 120; oNewItem.FromPane = 15; oNewItem.ToPane = 15; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto; oColumns = oMatrix.Columns; oColumn = oColumns.Add("Ava_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Ava_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Descrição"; oColumn.Width = 600; oColumn.Editable = true; oColumn = oColumns.Add("Ava_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "id"; oColumn.Width = 600; oColumn.Editable = true; oColumn.Visible = false; oForm.DataSources.DataTables.Add("oDataTableAvr"); oForm.DataSources.DataTables.Item("oDataTableAvr").ExecuteQuery("select * from [@FLX_FB_AVR] where U_FLX_FB_AVR_IDOOPR = '1' and U_FLX_FB_AVR_IDAMBI = '1'"); oColumn = oColumns.Item("Ava_Amb_C0"); oColumn.DataBind.Bind("oDataTableAvr", "U_FLX_FB_AVR_DESC"); oColumn = oColumns.Item("Ava_Amb_C1"); oColumn.DataBind.Bind("oDataTableAvr", "Code"); }
private void desenharCampos() { oItem = oForm.Items.Item("7"); oNewItem = oForm.Items.Add("Laudo_Text", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 60; oNewItem.Height = 19; oNewItem.Width = 150; oNewItem.Left = 25; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Laudo de vistoria inicial: "; oNewItem = oForm.Items.Add("Ini_An", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 60; oNewItem.Height = 17; oNewItem.Width = 250; oNewItem.Left = 170; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); //oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_MTG_INICIAL"); oNewItem = oForm.Items.Add("Laudo_Ini", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 60; oNewItem.Width = 200; oNewItem.Left = 430; oNewItem.Height = 20; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Novo laudo de vistoria inicial"; oNewItem = oForm.Items.Add("Mon_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 80; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Ambiente / Pendências"; oNewItem = oForm.Items.Add("Mon_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 740; oNewItem.Top = oItem.Top + 100; oNewItem.Height = 120; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("Mon_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Mon_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Ambiente"; oColumn.Width = 80; oColumn.Editable = false; oColumn = oColumns.Add("Mon_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX); oColumn.TitleObject.Caption = "Responsável"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Mon_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Descrição"; oColumn.Width = 320; oColumn.Editable = true; oColumn = oColumns.Add("Mon_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Anexo Vistoria Int. 1"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Mon_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Anexo Vistoria Int. 2"; oColumn.Width = 120; oColumn.Editable = true; oColumn = oColumns.Add("Mon_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Anexo Vistoria Int. 3"; oColumn.Width = 120; oColumn.Editable = true; oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'"); oColumn = oColumns.Item("Mon_Amb_C0"); oColumn.DataBind.Bind("oMatrixDT", "Descript"); oColumn = oColumns.Item("Mon_Amb_C1"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_RESPONS"); oColumn = oColumns.Item("Mon_Amb_C2"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_DESCRIC"); oColumn = oColumns.Item("Mon_Amb_C3"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_VSTINT1"); oColumn = oColumns.Item("Mon_Amb_C4"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_VSTINT2"); oColumn = oColumns.Item("Mon_Amb_C5"); oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_VSTINT3"); //Botao Nova vistoria intermediaria oNewItem = oForm.Items.Add("Laudo_Int", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 230; oNewItem.Width = 200; oNewItem.Left = 25; oNewItem.Height = 25; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Novo laudo de vistoria intermediária"; oNewItem = oForm.Items.Add("Mon_OS", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 50; oNewItem.Width = 100; oNewItem.Left = 780; oNewItem.Height = 25; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Gerar OS"; oNewItem = oForm.Items.Add("Mon_Text2", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 80; oNewItem.Height = 19; oNewItem.Width = 60; oNewItem.Left = 810; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "No. OS"; oNewItem = oForm.Items.Add("Mon_NoOS", SAPbouiCOM.BoFormItemTypes.it_EDIT); oNewItem.Top = oItem.Top + 100; oNewItem.Height = 17; oNewItem.Width = 40; oNewItem.Left = 810; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Enabled = false; oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific)); oNewItem = oForm.Items.Add("Mon_Planej", SAPbouiCOM.BoFormItemTypes.it_BUTTON); oNewItem.Top = oItem.Top + 150; oNewItem.Width = 100; oNewItem.Left = 780; oNewItem.Height = 25; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Visible = true; oButton = ((SAPbouiCOM.Button)(oNewItem.Specific)); oButton.Caption = "Planejamento"; oNewItem = oForm.Items.Add("Mon_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC); oNewItem.Top = oItem.Top + 285; oNewItem.Height = 19; oNewItem.Width = 350; oNewItem.Left = 25; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oNewItem.Visible = true; oTextItem = ((SAPbouiCOM.StaticText)(oNewItem.Specific)); oTextItem.Caption = "Itens Complementares"; oNewItem = oForm.Items.Add("Mon_Itc", SAPbouiCOM.BoFormItemTypes.it_MATRIX); oNewItem.Left = 25; oNewItem.Width = 880; oNewItem.Top = oItem.Top + 305; oNewItem.Height = 120; oNewItem.FromPane = 16; oNewItem.ToPane = 16; oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific)); oColumns = oMatrix.Columns; oColumn = oColumns.Add("Itc_#", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "#"; oColumn.Width = 30; oColumn.Editable = false; oColumn = oColumns.Add("Itc_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Item"; oColumn.Width = 40; oColumn.Editable = false; oColumn = oColumns.Add("Itc_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Descrição"; oColumn.Width = 200; oColumn.Editable = false; oColumn = oColumns.Add("Itc_Amb_C8", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Estoque"; oColumn.Width = 40; oColumn.Editable = false; oColumn = oColumns.Add("Itc_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Qtd"; oColumn.Width = 40; oColumn.Editable = false; oColumn = oColumns.Add("Itc_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Fornecedor"; oColumn.Width = 150; oColumn.Editable = false; oColumn = oColumns.Add("Itc_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Observação"; oColumn.Width = 200; oColumn.Editable = false; oColumn = oColumns.Add("Itc_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Prz Entrega"; oColumn.Width = 80; oColumn.Editable = true; oColumn = oColumns.Add("Itc_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "Solicitante"; oColumn.Width = 100; oColumn.Editable = true; oColumn = oColumns.Add("Itc_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX); oColumn.TitleObject.Caption = "Recebido"; oColumn.Width = 80; oColumn.Editable = true; oColumn.DisplayDesc = true; oColumn.ValOn = "1"; oColumn.ValOff = "0"; oColumn = oColumns.Add("Itc_Amb_C9", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "idFornecedor"; oColumn.Width = 40; oColumn.Editable = false; oColumn.Visible = false; oColumn = oColumns.Add("Itc_Amb_10", SAPbouiCOM.BoFormItemTypes.it_EDIT); oColumn.TitleObject.Caption = "idItensComp"; oColumn.Width = 40; oColumn.Editable = false; oColumn.Visible = false; oForm.DataSources.DataTables.Item("oDataTableItc").ExecuteQuery("select T1.ItemCode, T1.ItemName, T1.OnHand, T0.U_FLX_FB_ITC_QTD, T2.CardCode, T2.CardName, T0.U_FLX_FB_ITC_OBS, T0.DocEntry, T0.U_FLX_FB_ITC_PRZETG, T0.U_FLX_FB_ITC_SOLICI, T0.U_FLX_FB_ITC_RECEB from [@FLX_FB_ITC] T0 inner join OITM T1 on T1.ItemCode = T0.U_FLX_FB_ITC_IDOITM inner join OCRD T2 on T2.CardCode = T0.U_FLX_FB_ITC_IDOCRD where T0.U_FLX_FB_ITC_IDOOPR = '1'"); oColumn = oColumns.Item("Itc_Amb_C0"); oColumn.DataBind.Bind("oDataTableItc", "ItemCode"); oColumn = oColumns.Item("Itc_Amb_C1"); oColumn.DataBind.Bind("oDataTableItc", "ItemName"); oColumn = oColumns.Item("Itc_Amb_C8"); oColumn.DataBind.Bind("oDataTableItc", "OnHand"); oColumn = oColumns.Item("Itc_Amb_C2"); oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_QTD"); oColumn = oColumns.Item("Itc_Amb_C9"); oColumn.DataBind.Bind("oDataTableItc", "CardCode"); oColumn = oColumns.Item("Itc_Amb_C3"); oColumn.DataBind.Bind("oDataTableItc", "CardName"); oColumn = oColumns.Item("Itc_Amb_C4"); oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_OBS"); oColumn = oColumns.Item("Itc_Amb_10"); oColumn.DataBind.Bind("oDataTableItc", "DocEntry"); oColumn = oColumns.Item("Itc_Amb_C5"); oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_PRZETG"); oColumn = oColumns.Item("Itc_Amb_C6"); oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_SOLICI"); oColumn = oColumns.Item("Itc_Amb_C7"); oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_RECEB"); }