private void SetControlData() { if (Request["id"] != null) { string id = Request["id"]; DA_AnJuanBU aj2 = new DA_AnJuanBU(); DataSet ds = aj2.GetDetailByID1(id); aj2.Close(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < arr0.Length; i++) { Util.SetControlValue(this.ajnum.Parent.FindControl(arr0[i]), ds.Tables[0].Rows[0][arr0[i]]); } if (ds.Tables[0].Rows[0]["yjtime"] != DBNull.Value) { this.yjtime.Text = DateTime.Parse(ds.Tables[0].Rows[0]["yjtime"].ToString()).ToString("yyyy-MM-dd"); } if (ds.Tables[0].Rows[0]["time0"] != DBNull.Value) { this.time0.Text = DateTime.Parse(ds.Tables[0].Rows[0]["time0"].ToString()).ToString("yyyy-MM-dd"); } if (ds.Tables[0].Rows[0]["yjdanwei"] != DBNull.Value && ds.Tables[0].Rows[0]["yjdanwei"].ToString().Trim() != "") { this.ajstatus.Text = "已移交"; this.Button2.Visible = false; } else { this.ajstatus.Text = ""; } U_ZCBU zc1 = new U_ZCBU(); DataSet ds1 = zc1.GetDepartAndZeren(this.ajname.Text); zc1.Close(); if (ds1.Tables[0].Rows.Count > 0) { this.depart.Text = ds1.Tables[0].Rows[0]["depart"].ToString(); this.zeren.Text = ds1.Tables[0].Rows[0]["zeren"].ToString(); } ds1.Dispose(); } ds.Dispose(); } }