private void OnMatterChanged(int selection) { if (ClientSession.is_cur_selected_matter_changed == true && ClientSession.cur_selected_matter != null) { var result = MessageBox.Show("是否保存更改信息?", "信息已更改", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { ClientSession.SaveMatter(ClientSession.cur_selected_matter); } else { ClientSession.ReloadMatters(); } ClientSession.is_cur_selected_matter_changed = false; } if (selection < 0 || selection >= display_matters.Count) { CloseRight(); return; } ClientSession.cur_selected_matter = display_matters[selection]; UpdateRightGrid(); ShowRight(); ClientSession.is_cur_selected_matter_changed = false; }
public Main() { InitializeComponent(); ClientSession.OnMattersChange = MatterRefresh; ClientSession.OnUserInfoChange = () => { RefreshUserInfo(); return(true); }; ClientSession.OnFoldersChange = FolderRefresh; ClientSession.ReloadFolders(); ClientSession.ReloadMatters(); RefreshUserInfo(); CloseRight(); }
private void button_delete_right_Click(object sender, RoutedEventArgs e) { if (ClientSession.cur_selected_matter == null) { return; } if (ClientSession.cur_selected_matter.is_new) { ClientSession.ReloadMatters(); return; } ClientSession.is_cur_selected_matter_changed = false; ClientSession.DeleteMatter(ClientSession.cur_selected_matter.matter_id); }
private void renew_matter_button_Click(object sender, RoutedEventArgs e) { ClientSession.ReloadFolders(); ClientSession.ReloadMatters(); }