Exemplo n.º 1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtReportItemName.Text.Trim().Length==0)
            {
                strErr+="子项名称不能为空!\\n";
            }
            if(this.txtReportItemCode.Text.Trim().Length==0)
            {
                strErr+="子项编码不能为空!\\n";
            }
            if(this.txtAbnormalIndicator.Text.Trim().Length==0)
            {
                strErr+="N-正常L-低H-高不能为空!\\n";
            }
            if(this.txtResult.Text.Trim().Length==0)
            {
                strErr+="正文描述不能为空!\\n";
            }
            if(this.txtUnits.Text.Trim().Length==0)
            {
                strErr+="检验结果为数值型不能为空!\\n";
            }
            if(this.txtResultDateTime.Text.Trim().Length==0)
            {
                strErr+="检验日期及时间不能为空!\\n";
            }
            if(this.txtReferenceResult.Text.Trim().Length==0)
            {
                strErr+="结果参考值不能为空!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int id=int.Parse(this.lblid.Text);
            string ReportItemName=this.txtReportItemName.Text;
            string ReportItemCode=this.txtReportItemCode.Text;
            string AbnormalIndicator=this.txtAbnormalIndicator.Text;
            string Result=this.txtResult.Text;
            string Units=this.txtUnits.Text;
            string ResultDateTime=this.txtResultDateTime.Text;
            string ReferenceResult=this.txtReferenceResult.Text;

            RuRo.Model.ZSSY.LabTestResult model=new RuRo.Model.ZSSY.LabTestResult();
            model.id=id;
            model.ReportItemName=ReportItemName;
            model.ReportItemCode=ReportItemCode;
            model.AbnormalIndicator=AbnormalIndicator;
            model.Result=Result;
            model.Units=Units;
            model.ResultDateTime=ResultDateTime;
            model.ReferenceResult=ReferenceResult;

            RuRo.BLL.ZSSY.LabTestResult bll=new RuRo.BLL.ZSSY.LabTestResult();
            bll.Update(model);
            RuRo.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }
Exemplo n.º 2
0
 private void ShowInfo(int id)
 {
     RuRo.BLL.ZSSY.LabTestResult bll=new RuRo.BLL.ZSSY.LabTestResult();
     RuRo.Model.ZSSY.LabTestResult model=bll.GetModel(id);
     this.lblid.Text=model.id.ToString();
     this.lblReportItemName.Text=model.ReportItemName;
     this.lblReportItemCode.Text=model.ReportItemCode;
     this.lblAbnormalIndicator.Text=model.AbnormalIndicator;
     this.lblResult.Text=model.Result;
     this.lblUnits.Text=model.Units;
     this.lblResultDateTime.Text=model.ResultDateTime;
     this.lblReferenceResult.Text=model.ReferenceResult;
 }