コード例 #1
0
        private void MapSelected()
        {
            var mapper    = new CashFlowFixMapper((XPObjectSpace)ObjectSpace);
            var cashFlows = View.SelectedObjects;

            mapper.Process(cashFlows);

            new Xafology.ExpressApp.SystemModule.GenericMessageBox(
                "ACTION COMPLETED : Map Selected",
                "ACTION COMPLETED");
        }
コード例 #2
0
        public void MapCashFlows()
        {
            var mapper         = new CashFlowFixMapper(objSpace);
            var fromDateSqlVar = mapper.SqlDeclareClauses.Where(c => c.ParameterName == "FromDate").FirstOrDefault();
            var toDateSqlVar   = mapper.SqlDeclareClauses.Where(c => c.ParameterName == "ToDate").FirstOrDefault();
            var snapshotSqlVar = mapper.SqlDeclareClauses.Where(c => c.ParameterName == "Snapshot").FirstOrDefault();

            fromDateSqlVar.CommandText = string.Format("'{0}'", fromDate.ToString("yyyy-MM-dd"));
            toDateSqlVar.CommandText   = string.Format("'{0}'", toDate.ToString("yyyy-MM-dd"));
            snapshotSqlVar.CommandText = @"(SELECT TOP 1 [CurrentCashFlowSnapshot] FROM SetOfBooks WHERE GCRecord IS NULL)";

            mapper.ProcessByOids(
                @"SELECT cf.Oid FROM CashFlow cf
WHERE cf.TranDate BETWEEN @FromDate AND @ToDate
AND cf.GCRecord IS NULL
AND cf.Snapshot = @Snapshot");
        }