//绑定页面控件的值 private void SetControlData() { if (Request.QueryString["id"] != null) { string fileID = Request["id"]; DA_FilesBU file1 = new DA_FilesBU(); DataSet ds1 = file1.GetFileDetailByID(fileID); file1.Close(); if (ds1.Tables[0].Rows.Count > 0) { for (int i = 0; i < arr0.Length; i++) { Util.SetControlValue(this.ajnum.Parent.FindControl(arr0[i]), ds1.Tables[0].Rows[0][arr0[i]]); } if (ds1.Tables[0].Rows[0]["jyuetime"] != DBNull.Value && ds1.Tables[0].Rows[0]["jyuetime"].ToString().Trim() != "") { this.jyuetime.Text = DateTime.Parse(ds1.Tables[0].Rows[0]["jyuetime"].ToString()).ToString("yyyy-MM-dd"); this.djtime.Text = DateTime.Parse(ds1.Tables[0].Rows[0]["djtime"].ToString()).ToString("yyyy-MM-dd"); } } ds1.Dispose(); } }
//设置页面控件的值 private void SetControlData() { if (Request.QueryString["fileID"] != null) { string id = Request["fileID"]; DA_FilesBU file1 = new DA_FilesBU(); DataSet ds1 = file1.GetFileDetailByID(id); file1.Close(); if (ds1.Tables[0].Rows.Count > 0) { for (int i = 0; i < arr1.Length; i++) { Util.SetControlValue(this.ajnum.Parent.FindControl(arr1[i]), ds1.Tables[0].Rows[0][arr1[i]]); } } ds1.Dispose(); } }