public void BindIt(BPAttachmentM ment) { this.HisBPAttachment = ment; this.TB_No.Text = ment.Name; if (string.IsNullOrEmpty(this.TB_No.Text.Trim())) { this.TB_No.IsEnabled = true; } else { this.TB_No.IsEnabled = false; } this.TB_Name.Text = ment.Label; this.TB_SaveTo.Text = ment.SaveTo; this.CB_IsDelete.IsChecked = ment.IsDelete; this.CB_IsDownload.IsChecked = ment.IsDownload; this.CB_IsUpload.IsChecked = ment.IsUpload; }
void daSaveFile_SaveEnCompleted(object sender, FF.SaveEnCompletedEventArgs e) { if (e.Result.Contains("Err")) { MessageBox.Show(e.Result, "Error", MessageBoxButton.OK); return; } if (this.HisBPAttachment == null) { this.HisBPAttachment = new BPAttachmentM(); } this.HisBPAttachment.Label = this.TB_Name.Text; // this.HisBPAttachment.Exts = this.TB_Exts.Text; this.HisBPAttachment.IsDelete = (bool)this.CB_IsDelete.IsChecked; this.HisBPAttachment.IsDownload = (bool)this.CB_IsDownload.IsChecked; this.HisBPAttachment.IsUpload = (bool)this.CB_IsUpload.IsChecked; this.HisBPAttachment.SaveTo = this.TB_SaveTo.Text; MessageBox.Show("保存成功.", "Save OK", MessageBoxButton.OK); this.DialogResult = true; }