public UserInfoMob IsUserValid(string userName, string password, int portalID, int storeID, bool isChecked, string sessionCode)
    {
        SageFrameConfig pagebase = new SageFrameConfig();
        MembershipController member = new MembershipController();
        RoleController role = new RoleController();
        UserInfo user = member.GetUserDetails(portalID, userName);
        UserInfoMob userinfo = member.GetUserDetailsMob(portalID, userName);
        if (user.UserExists && user.IsApproved)
        {
            if (!(string.IsNullOrEmpty(password) && string.IsNullOrEmpty(password)))
            {
                if (PasswordHelper.ValidateUser(user.PasswordFormat, password, user.Password, user.PasswordSalt))
                {

                    int customerID = GetCustomerID();
                    if (customerID == 0)
                    {
                        CustomerGeneralInfo sageUserCust = CustomerGeneralInfoController.CustomerIDGetByUsername(user.UserName, portalID, storeID);
                        if (sageUserCust != null)
                        {
                            customerID = sageUserCust.CustomerID;
                            userinfo.CustomerID = customerID;
                        }
                    }

                    UpdateCartAnonymoususertoRegistered1(storeID, portalID, customerID, sessionCode);
                    userinfo.Status = 1;


                }
                else
                {
                    userinfo = new UserInfoMob();
                    userinfo.Status = 2;//User and Password Combination Doesnot match
                }
            }
        }
        else
        {
            userinfo = new UserInfoMob();
            userinfo.Status = 3;//User Doesnot Exist

        }
        return userinfo;
    }