csharp Agreagar elementos是tabla SAP B1

Posted

tags:

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

public string OnClick(SAPbouiCOM.Form pForma, SAPbouiCOM.ItemEvent pVal)
        {
            string Result = "";
            try
            {
                SAPbouiCOM.ComboBox Combo = (SAPbouiCOM.ComboBox)pForma.Items.Item("txtPais").Specific;
                VerificaExistentes(pForma);
                if (!(from A in RowsAgregadas where A == Combo.Selected.Value.Trim() select A).Any())
                {
                    pForma.Freeze(true);
                    SAPbouiCOM.Matrix matrix;
                    matrix = (SAPbouiCOM.Matrix)pForma.Items.Item("MaxPais").Specific;
                    matrix.AddRow();
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Linea, matrix.RowCount)).String = matrix.RowCount.ToString();
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Country, matrix.RowCount)).String = Combo.Selected.Value.Trim();
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Nom_Country, matrix.RowCount)).String = Combo.Selected.Description;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.DAI, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2DAI").Specific).String;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Selectivo, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Select").Specific).String;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Ley6949, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Ley6949").Specific).String;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.IDA, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2IDA").Specific).String;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.IFAM, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2IFAM").Specific).String;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Especifico, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Especi").Specific).String;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Otros, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Otros").Specific).String;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Ganancia, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Ganan").Specific).String;                    
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Sobretasa, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2SobTasa").Specific).String;
                    ((SAPbouiCOM.EditText)matrix.GetCellSpecific(EColPais.Ventas, matrix.RowCount)).String = ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Ventas").Specific).String;
                    matrix.FlushToDataSource();
                    RowsAgregadas.Add(Combo.Selected.Value.Trim());
                    
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Ley6949").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Otros").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Select").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2SobTasa").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Ventas").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2IDA").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2IFAM").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Especi").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2Ganan").Specific).String = "0";
                    ((SAPbouiCOM.EditText)pForma.Items.Item("Tx2DAI").Specific).String = "0";

                 }
                 else
                 {
                     Result = TConstantes.SBOLDObjeto.RetornoError + "ya el país esta ingresado";
                 }
            }

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

Mostrar ocultar elemento/显示隐藏元素

text Encontrar elemento en array

javascript se elemento tem outro

markdown elementos WSDL

java capturar elemento valor snnipet

python Adicionar elemento