Beispiel #1
0
        static void Main(string[] args)
        {
            Tearsheet ts = new Tearsheet();

            //string outputAddress = args[0];
            //int UpdateType = Convert.ToInt16(args[1]);

            //QueryManager qm = new QueryManager(outputAddress);

            //switch (UpdateType)
            //{
            //    case 0:
            //        string[] DealList = args[2].Split(',');
            //        qm.AddBonds(DateTime.Today, DealList);
            //        break;
            //    case 1:
            //        qm.CurrentPortfolioBehindScene(DateTime.Today);
            //        break;
            //    default:
            //        break;
            //}
        }
Beispiel #2
0
        public void DoSomeWork(Tearsheet ts, DateTime _AsOfDate)
        {
            // Variable declaration
            List <string>         DealList = new List <string>();
            List <List <string> > queryResult;

            AsOfDate = _AsOfDate;

            // Initialization
            ReadInQueries();
            queryResult = ConnectDB.ReadDB(2, string.Format("SELECT `CDONETNAME`,`LABEL`,SUM(`NOTIONAL`) AS `FACE` FROM GHIF_HOLDINGS " +
                                                            "WHERE `PURCHASEDATE` <= '{0}' GROUP BY `CDONETNAME` HAVING SUM(`NOTIONAL`) > 0", AsOfDate.ToString("yyyy-MM-dd")));
            foreach (List <string> iRow in queryResult)
            {
                DealList.Add(string.Format("{0}.{1}", iRow[0], iRow[1]));
            }

            ProcessQueries_MultipleDeals(DealList.ToArray(), 1);

            CleanUp();
            ts.SetDataSource(MasterTable);
        }