예제 #1
0
        public bool IsLastWeight(SAPbouiCOM.IMatrix mObjMatrix)
        {
            bool lBolLast = true;

            try
            {
                for (int i = 1; i <= mObjMatrix.RowCount; i++)
                {
                    //UPDATE RCordova
                    if (i == mObjMatrix.Columns.Item(i).Cells.Count&& ((SAPbouiCOM.EditText)mObjMatrix.Columns.Item("ItemCode").Cells.Item(i).Specific).Value == "" &&
                        (((SAPbouiCOM.EditText)mObjMatrix.Columns.Item("PesoN").Cells.Item(i).Specific).Value == "0.0"))
                    {
                        mObjMatrix.DeleteRow(i);
                        i--;
                    }
                    if (((SAPbouiCOM.EditText)mObjMatrix.Columns.Item("PesoN").Cells.Item(i).Specific).Value == "0.0")
                    {
                        lBolLast = false;
                    }
                    if (((SAPbouiCOM.EditText)mObjMatrix.Columns.Item("PesoN").Cells.Item(i).Specific).Value == "0.0" &&
                        ((SAPbouiCOM.EditText)mObjMatrix.Columns.Item("ItemCode").Cells.Item(i).Specific).Value == "")
                    {
                        lBolLast = true;
                    }
                }
            }
            catch (Exception)
            {
                return(false);
            }

            return(lBolLast);
        }
예제 #2
0
        /// <summary>
        /// Elimina las columnas (Para cargar nuevamente la matriz)
        /// </summary>
        public SAPbouiCOM.IMatrix DeleteColumns(SAPbouiCOM.IMatrix pObjMatrix)
        {
            int lIntRow = pObjMatrix.RowCount;

            if (lIntRow > 0)
            {
                for (int i = lIntRow; i > 0; i--)
                {
                    pObjMatrix.DeleteRow(i);
                }
            }
            int lIntCount = pObjMatrix.Columns.Count;

            for (int i = 0; i < lIntCount; i++)
            {
                pObjMatrix.Columns.Remove(0);
            }

            return(pObjMatrix);
        }