private void ClearData() { txtName.Text = ""; txtName.Tag = null; cbxType.SelectedIndex = 0; cbxSex.SelectedIndex = -1; cbxSex.Text = ""; cbxBodypart.SelectedIndex = -1; cbxBodypart.Text = ""; cbxPatientFrom.SelectedIndex = -1; cbxPatientFrom.Text = ""; rtbDescription.Text = ""; previewControl1.ImportByXml(""); }
private void LoadSignInfo() { _isBinding = true; try { previewControl1.ImportByXml(""); dataGridView1.DataSource = null; if (_reportData == null) { return; } if (_reportData.签名信息 == null) { return; } if (_reportData.签名信息.签名明细.Count <= 0) { return; } List <JReportSignItem> signs = _reportData.签名信息.签名明细.OrderByDescending(T => T.签名时间).ToList(); dataGridView1.DataSource = signs;// _reportData.签名信息.签名明细; dataGridView1.Columns["Key"].Visible = false; dataGridView1.Columns["用户ID"].Visible = false; dataGridView1.Columns["用户级别"].Visible = false; //dataGridView1.Columns["是否修订"].Visible = false; dataGridView1.Columns["是否审核"].Visible = false; dataGridView1.Columns["证书信息"].Visible = false; dataGridView1.Columns["签名结果"].Visible = false; dataGridView1.Columns["签名报告"].Visible = false; dataGridView1.Columns["签名时状态"].Visible = false; dataGridView1.Columns["签名时间"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; //dataGridView1.Sort(dataGridView1.Columns["签名时间"], ListSortDirection.Descending); } finally { _isBinding = false; if (dataGridView1.Rows.Count > 0) { dataGridView1.Rows[0].Selected = true; dataGridView1_SelectionChanged(dataGridView1, null); } } }