async void SaveCheckPhoto(StorageFile ImageFile) { IBuffer fileBuffer = await FileIO.ReadBufferAsync(ImageFile); byte[] btsImage = WindowsRuntimeBufferExtensions.ToArray(fileBuffer, 0, (int)fileBuffer.Length); Data.DoctorCheckLog photo = NewPhoto(); photo.Photo = btsImage; Views.CheckPhotoDetailEventArgs cva = new Views.CheckPhotoDetailEventArgs(); cva.InhosID = iCommon.Patient.InhosID; cva.CheckPhoto = photo; OnSaveCheckPhoto(null, cva); }
private void btnDeletePhoto_Click(object sender, RoutedEventArgs e) { if (this.gridPhotoList.SelectedItem == null) { return; } Data.DoctorCheckLog photo = gridPhotoList.SelectedItem as Data.DoctorCheckLog; Views.CheckPhotoDetailEventArgs arg = new Views.CheckPhotoDetailEventArgs(); arg.InhosID = iCommon.Patient.InhosID; arg.CheckPhoto = photo; OnDeleteCheckPhoto(null, arg); }
/// 在此页将要在 Frame 中显示时进行调用。 /// </summary> /// <param name="e">描述如何访问此页的事件数据。Parameter /// 属性通常用于配置页。</param> protected override void OnNavigatedTo(NavigationEventArgs e) { Views.CheckPhotoDetailEventArgs arg = new Views.CheckPhotoDetailEventArgs(); arg.InhosID = iCommon.Patient.InhosID; OnQueryCheckPhoto(null, arg); }
void View_OnQueryCheckPhoto(object sender, Views.CheckPhotoDetailEventArgs e) { QueryCheckPhoto(e.InhosID); }
void View_OnSaveCheckPhoto(object sender, Views.CheckPhotoDetailEventArgs e) { Model.SaveCheckLogToLocal(e.CheckPhoto); View.ExeShowCheckPhoto(e.CheckPhoto); }
void View_OnDeleteCheckPhoto(object sender, Views.CheckPhotoDetailEventArgs e) { Model.DeleteCheckLog(e.CheckPhoto); View.ExeDeleteCheckPhoto(e.CheckPhoto); }