/// <summary> /// 新增记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void BtnAddClickAsync(object sender, RoutedEventArgs e) { Lib.MemberAppraise NewRecord = new Lib.MemberAppraise() { MemberId = _CurUcViewModel.CurMember.Id, UserId = AppSet.LoginUser.Id }; UC_AppraiseWin AddWin = new UC_AppraiseWin(NewRecord); if (AddWin.ShowDialog().Value) { IEnumerable <MemberAppraise> MemberPlayMonths = await DataMemberAppraiseRepository.GetRecords(new MemberAppraiseSearch() { MemberId = NewRecord.MemberId, UserId = NewRecord.UserId }); ExcuteResult excuteResult = await DataMemberAppraiseRepository.AddRecord(NewRecord); if (excuteResult.State == 0) { NewRecord.Id = excuteResult.Tag; _CurUcViewModel.CurRecords.Add(NewRecord); } else { AppFuns.ShowMessage(excuteResult.Msg, Caption: "失败"); } } }