public List <UserManagementBO> GetUserDetails(string pageNumber, string pageSize, string sort, string searchText)
        {
            try
            {
                if (string.IsNullOrEmpty(pageNumber))
                {
                    pageNumber = "0";
                }

                if (string.IsNullOrEmpty(pageSize))
                {
                    pageSize = "0";
                }

                UserManagementBO objUserManagementBO = new UserManagementBO();
                objUserManagementBO.PageNumber = Convert.ToInt32(pageNumber);
                objUserManagementBO.PageSize   = Convert.ToInt32(pageSize);
                objUserManagementBO.Sort       = sort;
                objUserManagementBO.SearchText = searchText;

                List <UserManagementBO> lstUserManagementBO = new UserManagementBL().GetUserDetails(objUserManagementBO);
                return(lstUserManagementBO);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public List <TradingHistoryBO> GetTradingHistoryByUserId(string userId, string pageNumber, string pageSize, string sort, string searchText, string fromDate, string toDate)
        {
            try
            {
                if (string.IsNullOrEmpty(pageNumber))
                {
                    pageNumber = "0";
                }

                if (string.IsNullOrEmpty(pageSize))
                {
                    pageSize = "0";
                }

                TradingHistoryBO objTradingHistoryBO = new TradingHistoryBO();
                objTradingHistoryBO.PageNumber = Convert.ToInt32(pageNumber);
                objTradingHistoryBO.PageSize   = Convert.ToInt32(pageSize);
                objTradingHistoryBO.Sort       = sort;
                objTradingHistoryBO.SearchText = searchText;
                if (!string.IsNullOrEmpty(fromDate))
                {
                    objTradingHistoryBO.FromDate = Convert.ToDateTime(fromDate).ToString("yyyy-MM-dd"); //fromDate;
                }
                else
                {
                    objTradingHistoryBO.FromDate = string.Empty;
                }

                if (!string.IsNullOrEmpty(toDate))
                {
                    objTradingHistoryBO.ToDate = Convert.ToDateTime(toDate).ToString("yyyy-MM-dd");  //toDate;
                }
                else
                {
                    objTradingHistoryBO.ToDate = string.Empty;
                }

                List <TradingHistoryBO> lstTradingHistoryBO = new List <TradingHistoryBO>();
                if (!string.IsNullOrEmpty(Convert.ToString(HttpContext.Current.Session["UserIdToViewTradingHistory"])))
                {
                    objTradingHistoryBO.UserId = new Guid(Convert.ToString(HttpContext.Current.Session["UserIdToViewTradingHistory"]));

                    //Guid id = new Guid(Convert.ToString(userId));
                    lstTradingHistoryBO = new UserManagementBL().GetTradingHistoryByUserId(objTradingHistoryBO);
                }
                return(lstTradingHistoryBO);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public string ActiveInactiveUser(string userId)
        {
            string strResult = string.Empty;

            try
            {
                // 1 for success
                strResult = new UserManagementBL().ActiveInactiveUser(Convert.ToInt64(userId));
                if (strResult == "1")
                {
                    strResult = "Update";
                }
                else
                {
                    strResult = "NoUpdate";
                }
            }
            catch (Exception ex)
            {
                strResult = "5"; // Exception
            }
            return(strResult);
        }