//
        // GET: /Stock/
        /// <summary>
        /// Index
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            VMIndex objVMIndex = new VMIndex();

            StockModels objStockModels = new StockModels();

            Int32 GmtInfo = Convert.ToInt32(Session["GMTInfo"]);
            objVMIndex.VMOptionFilterType = objStockModels.GetOptionFilters(Convert.ToInt32(Session["user"]));
            if (Convert.ToInt32(Session["user"]) > 0)
            {
                objVMIndex.LstOpenTrade = objStockModels.GetOpenTrades(Convert.ToInt32(Session["user"]), GmtInfo);
                objVMIndex.LstTradeHistory = objStockModels.GetTradeHistory(Convert.ToInt32(Session["user"]), GmtInfo);

            }

            return View(objVMIndex);
        }
        public ActionResult GetTradeTabs(string all)
        {
            VMIndex objVMIndex = new VMIndex();

            StockModels objStockModels = new StockModels();

            Int32 UserId = Convert.ToInt32(Session["user"]);

            Int32 GmtInfo = Convert.ToInt32(Session["GMTInfo"]);

            try
            {
                if (UserId > -1)
                {
                    objVMIndex.LstOpenTrade = objStockModels.GetOpenTrades(UserId, GmtInfo);
                    if (all != "True")
                    {
                        objVMIndex.LstTradeHistory = objStockModels.GetTradeHistory(UserId, GmtInfo);
                    }
                    else
                    {
                        objVMIndex.LstTradeHistory = objStockModels.GetAllTradeHistory(UserId, GmtInfo);
                    }

                    Session["TradeBalance"] = objStockModels.GetUserAccountBalance(UserId);

                    return PartialView("_TradeTabs", objVMIndex);
                }
                else
                {
                    CTrade objCTrade = new CTrade();
                    objCTrade.TradeId = -1;
                    return Json(objCTrade);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }