Ejemplo n.º 1
0
        public void BNNextIndex()
        {
            string _pathOptionsData     = ConfigurationManager.AppSettings["BNNextOptions"];
            string _masterDatapathBasic = ConfigurationManager.AppSettings["bnUrl"];
            string _bnCurrentExpiryDate = ConfigurationManager.AppSettings["BnNextExpiryDate"];
            string _bnBNSeriousValue    = ConfigurationManager.AppSettings["BNSeriousValue"];
            string _bnCurrentUrlValue   = ConfigurationManager.AppSettings["bnUrl"];
            int    _count = Convert.ToInt32(ConfigurationManager.AppSettings["IndexNumbers"]);

            string      _url     = _bnCurrentUrlValue.Replace("EXPIRYCODE", _bnCurrentExpiryDate).Replace("TYPECEPE", "CE").Replace("INDEXVALUE", _bnBNSeriousValue);
            QueryBinder dataList = new QueryBinder();
            OptionsIO   obj      = new OptionsIO();
            List <OIOData.OIDetails> optionsData = obj.LoadOptionsData(_masterDatapathBasic, _bnCurrentExpiryDate, _url, 100F, _count);

            OBJtoXML xmltoObj = new OBJtoXML();

            xmltoObj.CreateOptionsXML(optionsData, _pathOptionsData, "BNNextIndex");
        }
Ejemplo n.º 2
0
        public void Stk()
        {
            string                   _masterDatapathBasic = ConfigurationManager.AppSettings["bnUrl"];
            string                   _pathOptionsData     = ConfigurationManager.AppSettings["StkOptions"];
            string                   _expiryDate          = ConfigurationManager.AppSettings["ExpiryDate"];
            string                   _nSeriousValue       = ConfigurationManager.AppSettings["NSeriousValue"];
            string                   _nCurrentUrlValue    = ConfigurationManager.AppSettings["StkUrlBasic"];
            int                      _count      = Convert.ToInt32(ConfigurationManager.AppSettings["StkNumbers"]);
            List <string>            objStkList  = IOData.StPrice.StkPrices();
            List <OIOData.OIDetails> optionsData = new List <OIDetails>();

            foreach (var item in objStkList)
            {
                string      _url     = _nCurrentUrlValue.Replace("EXPIRYCODE", _expiryDate).Replace("COMPANYNAME", item.Split('#')[0].Trim());
                QueryBinder dataList = new QueryBinder();
                OptionsIO   obj      = new OptionsIO();
                optionsData.AddRange(obj.LoadOptionsData(_masterDatapathBasic.Replace("BANKNIFTY", item.Split('#')[0].Trim()).Replace("OPTIDX", "OPTSTK"), _expiryDate, _url, Convert.ToSingle(item.Split('#')[1].Trim()), _count));
            }


            OBJtoXML xmltoObj = new OBJtoXML();

            xmltoObj.CreateOptionsXML(optionsData, _pathOptionsData, "StkOptions");
        }