/// <summary> /// 展示数据 /// </summary> /// <param name="id">记录Id</param> private void ShowInfo(int id) { LCheckDetailBB checkDetailBB = new LCheckDetailBB(); vLCheckDetailData model = new vLCheckDetailData(); SFileBB fileBB = new SFileBB(); try { model = checkDetailBB.GetVModel(id); this.materialNo.Text = model.materialNo; this.materialDesc.Text = model.materialDesc; this.checkDetailDesc.Text = model.checkDetailDesc; this.checkItemId.SelectedValue = model.checkItemId.ToString(); this.dateType.SelectedValue = model.dateType; this.unit.Text = model.unit; this.uplimit.Text = model.uplimit; this.downlimit.Text = model.downlimit; this.standDesc.Text = model.standDesc; if (model.isMustCheck != null) { this.isMustCheck.Checked = model.isMustCheck; } if (model.isAddupCheck != null) { this.isAddupCheck.Checked = model.isAddupCheck; } this.checkAmount.Text = model.checkAmount.ToString(); this.openBoxScale.Text = Convert.ToString(model.openBoxScale * 100); this.checkOutScale.Text = Convert.ToString(model.checkOutScale * 100); this.mark.Text = model.mark; if (model.checkFileId != 0) { this.fileId.Value = Convert.ToString(model.checkFileId); this.fileNm.Value = fileBB.GetBatchFileNm(Convert.ToString(model.checkFileId)); this.localeImage.ImageUrl = "../../../Common/Image.ashx?ImID=" + Convert.ToString(model.checkFileId); } //else //{ // this.fileId.Value = model.checkFileId.ToString(); // this.fileNm = //} } finally { checkDetailBB.Dispose(); fileBB.Dispose(); } }
/// <summary> /// չʾ���� /// </summary> /// <param name="id">��¼Id</param> private void ShowInfo(int id) { SFileBB fileBB = new SFileBB(); LMessageBB messageBB = new LMessageBB(); LMessageData model = new LMessageData(); try { model = messageBB.GetModel(id); this.title.Text = model.title; this.content.Value = model.content; this.fileId.Value = model.fileId; this.fileNm.Text = fileBB.GetBatchFileNm(model.fileId); if (this.sort.Items.FindByValue(model.sort.ToString()) != null) { this.sort.SelectedValue = model.sort.ToString(); } this.author.Text = model.author; this.isIndexShow.Checked = model.isIndexShow; } finally { fileBB.Dispose(); messageBB.Dispose(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.BindCheckItemList();//绑定检测大类 if (Request.Params["id"] != null && Request.Params["id"].Trim() != "") { this.IdValue = Convert.ToInt32(Request.Params["id"]); } if (Request.Params["state"] != null && Request.Params["state"].Trim() != string.Empty) { this.State = Request.Params["state"].ToString(); switch (this.State) { case "1": //add this.fileId.Value = "0"; this.fileNm.Value = "0"; break; case "2": //update this.ShowInfo(this.IdValue); break; default: break; } } } //页面刷新展示图片 using (SFileBB fileBB = new SFileBB()) { if (this.fileId.Value != "") { this.fileNm.Value = fileBB.GetBatchFileNm(Convert.ToString(this.fileId.Value)); this.localeImage.ImageUrl = "../../../Common/Image.ashx?ImID=" + Convert.ToString(this.fileId.Value); } } }