コード例 #1
0
        }//fin MenuEvent

        private void Borrar()
        {
            Int32   i;
            Boolean Paso = false;
            String  DocEntry;

            SAPbouiCOM.EditText oEditText;
            TFunctions          Reg;

            try
            {
                oForm.Freeze(true);
                Reg       = new TFunctions();
                Reg.SBO_f = FSBOf;
                i         = 1;
                while (i <= oMtx.RowCount)
                {
                    if (oMtx.IsRowSelected(i))
                    {
                        oEditText = (EditText)(oMtx.Columns.Item("DocEntry").Cells.Item(i).Specific);
                        DocEntry  = (System.String)(oEditText.Value).Trim();
                        if (DocEntry != "")
                        {
                            Reg.DelDataSource("D", "VID_FEPROCED", "", FSBOf.StrToInteger(DocEntry));
                            oMtx.DeleteRow(i);
                            Paso = true;
                            i    = oMtx.RowCount;
                        }
                    }
                    i++;
                }
                if (!Paso)
                {
                    FSBOApp.StatusBar.SetText("Debe seleccionar una linea", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Warning);
                }
                else
                {
                    oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                }
            }
            catch (Exception x)
            {
                oForm.Freeze(false);
            }
        }