public CardHolder_MstDTO GetUserInfoById(long CardHolder_Id)
        {
            /*
             * var users = repCardHolder_Mst.Find(u => u.CardHolder_Id == CardHolder_Id).Select(u => new CardHolder_MstDTO()
             * {
             *  CardHolder_Id = u.CardHolder_Id,
             *  User_nm = u.User_nm,
             *  Personal_Msg = u.Personal_Msg,
             * }).ToList();
             *
             * CardHolder_MstDTO CardHolder = null;
             * if (users.Count < 2)
             * {
             *  CardHolder = users.SingleOrDefault();
             * }
             * else
             * {
             *  CardHolder = users.First();
             * }
             */
            BOBCardEntities _db = new BOBCardEntities();
            var             obj = _db.GetUserInfoById(CardHolder_Id).Select(u => new CardHolder_MstDTO()
            {
                CardHolder_Id      = u.CardHolder_Id,
                User_nm            = u.User_nm,
                User_pwd           = u.User_pwd,
                Created_dt         = u.Created_dt,
                Updated_dt         = u.Updated_dt,
                IP_Address         = u.IP_Address,
                Personal_Msg       = u.Personal_Msg,
                IsActive           = u.IsActive,
                IsPermanentDisable = u.IsPermanentDisable,
                //IsLoggedInCurrently = u.IsLoggedInCurrently,
                Oracle_Customer_Id    = u.Oracle_Customer_Id,
                credit_card_number    = u.credit_card_number,
                creditcard_acc_number = u.creditcard_acc_number,
                InvalidLastLoginDt    = u.InvalidLastLoginDt,
                CurrentLoginDate      = u.CurrentLoginDate,
                LastLoginDate         = u.LastLoginDate,
                LocalIP_Address       = u.Local_IpAddress
            });

            var Objusers = new CardHolder_MstDTO();

            Objusers = obj.First();
            return(Objusers);
        }
        /// <summary>
        /// Gets the user by ID.
        /// </summary>
        /// <param name="CardHolder_Id">The card holder_ id.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public CardHolder_MstDTO getUserByID(long CardHolder_Id)
        {
            //start commented by abhijeet on 20/08/2019

            /*
             * var users = repCardHolder_Mst.Find(u => u.CardHolder_Id == CardHolder_Id).Select(u => new CardHolder_MstDTO()
             * {
             *  CardHolder_Id = u.CardHolder_Id,
             *  User_nm = u.User_nm,
             *  User_pwd = u.User_pwd,
             *  UID = u.UID,
             *  Profile_Photo = u.Profile_Photo,
             *  AddOn1_Photo = u.AddOn1_Photo,
             *  AddOn2_Photo = u.AddOn2_Photo,
             *  AddOn3_Photo = u.AddOn3_Photo,
             *  IsActive = u.IsActive,
             *  IsPermanentDisable = u.IsPermanentDisable,
             *  //IsLoggedInCurrently = u.IsLoggedInCurrently,
             *  Created_dt = u.Created_dt,
             *  Updated_dt = u.Updated_dt,
             *  IP_Address = u.IP_Address,
             *  Personal_Msg = u.Personal_Msg,
             *  Oracle_Customer_Id = u.Oracle_Customer_Id,
             *  credit_card_number = u.credit_card_number,
             *  creditcard_acc_number = u.creditcard_acc_number,
             *  CurrentLoginDate = u.CurrentLoginDate,
             *  LastLoginDate = u.LastLoginDate
             *
             * }).ToList();
             */
            //end commented by abhijeet on 20/08/2019

            //start added by abhijeet on 20/08/2019
            BOBCardEntities _db = new BOBCardEntities();
            var             obj = _db.GetUserInfoById(CardHolder_Id).Select(u => new CardHolder_MstDTO()
            {
                CardHolder_Id      = u.CardHolder_Id,
                User_nm            = u.User_nm,
                User_pwd           = u.User_pwd,
                Created_dt         = u.Created_dt,
                Updated_dt         = u.Updated_dt,
                IP_Address         = u.IP_Address,
                Personal_Msg       = u.Personal_Msg,
                IsActive           = u.IsActive,
                IsPermanentDisable = u.IsPermanentDisable,
                //IsLoggedInCurrently = u.IsLoggedInCurrently,
                Oracle_Customer_Id    = u.Oracle_Customer_Id,
                credit_card_number    = u.credit_card_number,
                creditcard_acc_number = u.creditcard_acc_number,
                InvalidLastLoginDt    = u.InvalidLastLoginDt,
                CurrentLoginDate      = u.CurrentLoginDate,
                LastLoginDate         = u.LastLoginDate,
                LocalIP_Address       = u.Local_IpAddress
            });

            var CardHolder = new CardHolder_MstDTO();

            CardHolder = obj.First();

            /*
             * CardHolder_MstDTO CardHolder = null;
             * if (users.Count < 2)
             * {
             *  CardHolder = users.SingleOrDefault();
             * }
             * else
             * {
             *  CardHolder = users.First();
             * }
             */
            //end added by abhijeet on 20/08/2019

            CardManager cm = new CardManager();

            if (CardHolder != null)
            {
                if (CardHolder.creditcard_acc_number != null)
                {
                    CH_CardDTO card = cm.GetCardByCreditCardNumber(new CH_CardDTO()
                    {
                        Cr_Account_Nbr = CardHolder.creditcard_acc_number.Decrypt()
                    });
                    if (card != null)
                    {
                        CardHolder.CH_Card   = card;
                        CardHolder.FULL_NAME = card.FULL_NAME;
                    }
                }
            }

            return(CardHolder);
        }