public List<CarsInfo.UserLoginInfo> PerformLoginMobile(string Username, string Password, string AuthenticationID, string CustomerID)
    {
        MobileBL objUser = new MobileBL();
        var obj = new List<CarsInfo.UserLoginInfo>();
        try
        {
            if (CustomerID.Trim() != "")
            {
                DataSet dsSaveCustInfo = objUser.SaveMobileCustomerInfo("PerformLoginMobile", CustomerID, AuthenticationID, Username);
            }

            if (AuthenticationID == ConfigurationManager.AppSettings["AppleID"].ToString())
            {
                obj = (List<CarsInfo.UserLoginInfo>)objUser.PerformLoginMobile(Username, Password);
                if (obj.Count > 0)
                {

                    int UserID = Convert.ToInt32(obj[0].UID.ToString());
                    DataSet ds = objUser.MobileSaveUserLog(UserID);
                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            obj[0].SessionID = ds.Tables[0].Rows[0]["M_UCESessionID"].ToString();
                        }
                    }
                }
            }
            if (obj.Count <= 0)
            {
                CarsInfo.UserLoginInfo objinfo = new UserLoginInfo();
                objinfo.AASuccess = "Failure";
                obj.Add(objinfo);
            }
        }
        catch (Exception ex)
        {
        }

        return obj;
    }
        private void AssignUserLoginInfo(IDataReader CarInfoDataReader, UserLoginInfo ObjUserInfo_Info)
        {
            try
            {
                ObjUserInfo_Info.AASuccess = "User Existed";
                ObjUserInfo_Info.IsActive = CarInfoDataReader["isActive"].ToString() == "" ? "Emp" : CarInfoDataReader["isActive"].ToString();
                ObjUserInfo_Info.Name = CarInfoDataReader["Name"].ToString() == "" ? "Emp" : CarInfoDataReader["Name"].ToString();
                ObjUserInfo_Info.UserID = CarInfoDataReader["UserID"].ToString() == "" ? "Emp" : CarInfoDataReader["UserID"].ToString();
                ObjUserInfo_Info.UID = CarInfoDataReader["UId"].ToString() == "" ? "Emp" : CarInfoDataReader["UId"].ToString();
                ObjUserInfo_Info.PhoneNumber = CarInfoDataReader["PhoneNumber"].ToString() == "" ? "Emp" : CarInfoDataReader["PhoneNumber"].ToString();
                ObjUserInfo_Info.PackageID = CarInfoDataReader["PackageID"].ToString() == "" ? "Emp" : CarInfoDataReader["PackageID"].ToString();

            }
            catch (Exception ex)
            {
            }
        }
    public List<CarsInfo.UserLoginInfo> PerformLoginMobile(string Username, string Password)
    {
        MobileBL objUser = new MobileBL();
        var obj = new List<CarsInfo.UserLoginInfo>();
        try
        {
            obj = (List<CarsInfo.UserLoginInfo>)objUser.PerformLoginMobile(Username, Password);
            if (obj.Count <= 0)
            {
                CarsInfo.UserLoginInfo objinfo = new UserLoginInfo();
                objinfo.AASuccess = "Failure";
                obj.Add(objinfo);
            }
        }
        catch (Exception ex)
        {
        }

        return obj;
    }
        public IList<UserLoginInfo> PerformLoginMobile(string UsersID, string sPassword)
        {
            IList<UserLoginInfo> UsersInfoIList = new List<UserLoginInfo>();
            try
            {
                string spNameString = string.Empty;

                //Setting Connection
                //Global.INSTANCE_NAME = strCurrentConn;

                IDataReader CarInfoDataReader = null;

                Database dbDatabase = DatabaseFactory.CreateDatabase(Global.CarsConnTest);
                spNameString = "USP_Perform_Login";
                DbCommand dbCommand = null;
                dbCommand = dbDatabase.GetStoredProcCommand(spNameString);

                dbDatabase.AddInParameter(dbCommand, "@UName", System.Data.DbType.String, UsersID);
                dbDatabase.AddInParameter(dbCommand, "@Password", System.Data.DbType.String, sPassword);

                CarInfoDataReader = dbDatabase.ExecuteReader(dbCommand);

                while (CarInfoDataReader.Read())
                {
                    //Assign values to the MakesInfo object list
                    UserLoginInfo ObjUserInfo_Info = new UserLoginInfo();
                    AssignUserLoginInfo(CarInfoDataReader, ObjUserInfo_Info);
                    UsersInfoIList.Add(ObjUserInfo_Info);
                }

            }
            catch (Exception ex)
            {
                throw ex;
            }

            return UsersInfoIList;
        }