/// <summary> /// 绑定值 /// </summary> /// <param name="storageID"></param> private void BindDetails(string storageID) { if (!string.IsNullOrEmpty(storageID)) { StorageList storage = new StorageList(); DataTable dt = storage.GetEntityByID(storageID) as DataTable; if (dt != null && dt.Rows.Count > 0) { this.txt_SNo.Text = storageID; this.txt_SNo.ReadOnly = true; this.txt_Date.Text = dt.Rows[0]["GenerationTime"] == null ? "" : Convert.ToDateTime(dt.Rows[0]["GenerationTime"].ToString()).ToShortDateString(); this.txt_Description.Text = dt.Rows[0]["StorageDescription"] == null ? "" : dt.Rows[0]["StorageDescription"].ToString(); } } }
/// <summary> /// 绑定值 /// </summary> /// <param name="storageID"></param> private void BindDetails(string storageID) { if (!string.IsNullOrEmpty(storageID)) { StorageList storage = new StorageList(); DataTable dt = storage.GetEntityByID(storageID) as DataTable; if (dt != null && dt.Rows.Count > 0) { this.txt_SNo.Text = storageID; this.txt_SNo.ReadOnly = true; this.txt_Date.Text = dt.Rows[0]["GenerationTime"] == null ? "" : Convert.ToDateTime(dt.Rows[0]["GenerationTime"].ToString()).ToShortDateString(); this.txt_Description.Text = dt.Rows[0]["StorageDescription"] == null ? "" : dt.Rows[0]["StorageDescription"].ToString(); } } }