public void Save_Student_House(User user_)
        {
            StudentHouse studentHouse = new StudentHouse();
            // save current house for student
            user_.HouseId = Guid.Parse(hdHouseId.Value);
            user_.UpdateHouse();

            // log house details for futer use
            studentHouse.HouseId = Guid.Parse(hdHouseId.Value);
            studentHouse.UserId = user_.UserId.Value;
            studentHouse.CreatedBy = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());
            studentHouse.UpdatedBy = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());

            studentHouse.Save();
        }
        public bool Save_Student_House()
        {
            bool result = true;

            User user = new User();
            StudentHouse studentHouse = new StudentHouse();

            user.UserId = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());
            user.HouseId = Guid.Parse(hdHouseId.Value);
            user.UpdatedBy = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());
            user.CreatedBy = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());

            if (user.UpdateHouse())
            {

                studentHouse.HouseId = user.HouseId.Value;
                studentHouse.UserId = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());
                studentHouse.CreatedBy = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());
                studentHouse.UpdatedBy = Guid.Parse(Membership.GetUser().ProviderUserKey.ToString());

                result = studentHouse.Save();
            }

            return result;
        }