protected void setData() { DataTable dataTable = DocumentAction.QueryOneReceiveFile(this.FileID); if (dataTable.Rows.Count == 1) { this.txtReceiveType.Enabled = true; this.txtTitle.Text = dataTable.Rows[0]["Title"].ToString(); this.txtSendCorpName.Text = dataTable.Rows[0]["SendCorpName"].ToString(); this.txtReceiveType.SelectedValue = dataTable.Rows[0]["ReceiveType"].ToString(); this.txtReceiveDate.Text = dataTable.Rows[0]["ReceiveDate"].ToString(); this.txtRemark.Text = dataTable.Rows[0]["Remark"].ToString(); this.hdnFilePath.Value = dataTable.Rows[0]["FilePath"].ToString(); this.txtOriginalName.Text = dataTable.Rows[0]["OriginalName"].ToString(); this.annexName.InnerText = dataTable.Rows[0]["OriginalName"].ToString(); if (this.hdnFilePath.Value.Length > 0) { this.tr_add.Visible = false; this.tr_edit.Visible = true; return; } this.tr_add.Visible = true; this.tr_edit.Visible = false; } }