Skip to Content
0
Former Member
Jun 02, 2014 at 01:58 PM

Slow when fill batch numbers in matrix

115 Views

Hi,

I am using the following code to fill a matrix in the batch numbers windows, this codes come from other windows where the user set his batch numbers and click ok.

My problem is this routine is slow based in the user simulation clic and I need this become more fast.

I use the .Freeze(true) command to get more speed, but doesnt work.

Actually this give me 18 codes per minute. My problems is when the user set 6.200.000.

Can provide me some tips to do it? or other way to get the goal.

Thanks.

EDIT: sorry when I want to mean is "Slow" is when my code write on the matrix (the batch number window) how can I get more speed in the process?

oBultosForm.Freeze(true);
                    z = 1;
                    foreach (var item in seriales)
                    {
                        SAPbouiCOM.EditText oEditTex3 = (SAPbouiCOM.EditText)oGrid.Columns.Item(2).Cells.Item(z).Specific;
                        oEditTex3.Value = item.Serial;
                        SAPbouiCOM.EditText oEditTex4 = (SAPbouiCOM.EditText)oGrid.Columns.Item(5).Cells.Item(z).Specific;
                        oEditTex4.Value = item.Cantidad;
                        oGrid.Columns.Item(20).Cells.Item(z).Click(BoCellClickType.ct_Regular);
                        SBO_Application.Menus.Item("5888").SubMenus.Item("5963").Activate();
                        oBultosForm = SBO_Application.Forms.GetForm("1470000006", 0);
                        oBultosForm.Freeze(true);
                        oGrid1 = (SAPbouiCOM.Matrix)oBultosForm.Items.Item("1470000019").Specific;
                        SAPbouiCOM.EditText oEd4 = (SAPbouiCOM.EditText)oGrid1.Columns.Item(1).Cells.Item(1).Specific;
                        oEd4.Value = item.Ubicacion;
                        SAPbouiCOM.EditText oEd5 = (SAPbouiCOM.EditText)oGrid1.Columns.Item(2).Cells.Item(1).Specific;
                        oEd5.Value = item.Cantidad;
                        SBO_Application.Forms.ActiveForm.Items.Item("1470000001").Click(BoCellClickType.ct_Double);
                         z++;
                    }
                    oBultosForm = SBO_Application.Forms.ActiveForm;
                    oBultosForm.Freeze(false);