//更新用户信息25 ok public bool UpdateUserInfo(RegistedUser User) { bool IsSucceed = false; //数据访存器 DatabaseAccess.DataClasses1DataContext DBAccessor = new DataClasses1DataContext(); try { if(User is NonPaymentRegisterUser) { DBAccessor.updateRegistedUser(User.UserName, User.Password, User.NickName, User.Email, User.Phone, User.ZoneStyle.ID, User.Portrait, User.City, User.School, User.Address,1,0,null); } else if (User is PaymentRegisterUser) { PaymentRegisterUser user = (PaymentRegisterUser)User; DBAccessor.updateRegistedUser(user.UserName, user.Password, user.NickName, user.Email, user.Phone, user.ZoneStyle.ID, user.Portrait, user.City, user.School, user.Address, 2, user.PayAmount,user.paymentEndTime); } IsSucceed = true; } catch (Exception e) { IsSucceed = false; } return IsSucceed; }