Exemple #1
0
        protected override object add()
        {
            _editor.adapter.add();

            // return _editor.edit();

            _editor.edit();
            return(null);
        }
        private object cash(DataRow pRow)
        {
            if (pRow == null)
            {
                return(null);
            }

            EditingTools _editor = environment.getAdapter(ConstAdapterNames.adp_fin_cash_client_input);

            if (_editor == null)
            {
                return(null);
            }

            _editor.adapter.add();
            DataSet   ds  = _editor.adapter.getDataSet();
            DataTable tab = ds.Tables[TableKSLINES.TABLE];

            ToolColumn.setColumnValue(tab, TableKSLINES.AMOUNT, Math.Max((double)pRow[TableCLCARD.BALANCE], 0));
            ToolColumn.setColumnValue(tab, TableKSLINES.CLIENTREF, pRow[TableCLCARD.LOGICALREF]);
            //ToolColumn.setColumnValue(tab, TableKSLINES.CANCELLED, pRow[TableINVOICE.CANCELLED]);
            //ToolColumn.setColumnValue(tab, TableKSLINES.DATE_, pRow[TableINVOICE.DATE_]);

            object invLref_ = pRow[TableINVOICE.LOGICALREF];

            _editor.handlerReferenceInformer = (EditingTools pTool, object pLref) =>
            {
                refresh(invLref_);
            };

            _editor.edit();

            return(invLref_);
        }