csharp llenar grid zh SAP B1

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp llenar grid zh SAP B1相关的知识,希望对你有一定的参考价值。

     TTransaction _Transaccion = TRutinas.CreaTransaccion();
            
            TQuery _Query = new TQuery(_Transaccion.Conexion);
            SAPbobsCOM.Recordset recset;
            recset = (SAPbobsCOM.Recordset)TConstantes.SBOLDObjeto.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);

            EditText txtEdit;
            txtEdit = (EditText)pForma.Items.Item("txtFamCod").Specific;

            TJoin _JoinSubFamDet = new TJoin(TTipoJoin.Inner, "@LDT_SUBFAM_DET", "C");
            _JoinSubFamDet.Where(new TField("C", "Code"), OperadoresFiltros.Igual, new TField("A", "U_LDT_Cod_SubFam"));

            TJoin _JoinSubFaamilia = new TJoin(TTipoJoin.Inner, "@LDT_SUBFAMILIA", "B");
            _JoinSubFaamilia.Where(new TField("B", "Code"), OperadoresFiltros.Igual, new TField("A", "U_LDT_Cod_SubFam"));

            _Query.Selected(new TField("C", "Code"));
            _Query.Selected(new TField("C", "LineId"));
            _Query.Selected(new TField("C", "U_LDT_Cod_SubDiv"));
            _Query.Selected(new TField("B", "Name"));
            _Query.From(new TFrom("@LDT_FAMILIA_DET", "A"));
            _Query.From(_JoinSubFamDet);
            _Query.From(_JoinSubFaamilia);
            _Query.Where(new TField("A", "Code"), OperadoresFiltros.Igual, new TValue(txtEdit.String));
            if (_Query.Open())
            {
        
                    Grid grid;
                    grid = (Grid)pForma.Items.Item("Max4").Specific;
                    DataTable dataTable;

                    dataTable = pForma.DataSources.DataTables.Add("dataTable");
                    dataTable.ExecuteQuery(_Query.SQL);

                    grid.DataTable = dataTable;

            }

以上是关于csharp llenar grid zh SAP B1的主要内容,如果未能解决你的问题,请参考以下文章

ruby Ruby:Llenar un hash con valores por defecto

csharp asignar fecha SAP

csharp TQUERY SAP

csharp SAP连接类

csharp Agreagar elementos是tabla SAP B1

csharp Filtrar combo del sistema en SAP(no probado)