Example #1
0
 private void ShowInfo(int id)
 {
     RuRo.BLL.ZSSY.SpecimenRtLog bll=new RuRo.BLL.ZSSY.SpecimenRtLog();
     RuRo.Model.ZSSY.SpecimenRtLog model=bll.GetModel(id);
     this.lblid.Text=model.id.ToString();
     this.lblusername.Text=model.username;
     this.lblPatiendId.Text=model.PatiendId;
     this.lblSampleId.Text=model.SampleId;
     this.lblPostBackStatus.Text=model.PostBackStatus;
     this.lblPostBackDate.Text=model.PostBackDate.ToString();
 }
Example #2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtusername.Text.Trim().Length==0)
            {
                strErr+="回发此数据的用户不能为空!\\n";
            }
            if(this.txtPatiendId.Text.Trim().Length==0)
            {
                strErr+="回发的患者唯一标识不能为空!\\n";
            }
            if(this.txtSampleId.Text.Trim().Length==0)
            {
                strErr+="回发的样本id不能为空!\\n";
            }
            if(this.txtPostBackStatus.Text.Trim().Length==0)
            {
                strErr+="回发后的状态不能为空!\\n";
            }
            if(!PageValidate.IsDateTime(txtPostBackDate.Text))
            {
                strErr+="回发时间格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int id=int.Parse(this.lblid.Text);
            string username=this.txtusername.Text;
            string PatiendId=this.txtPatiendId.Text;
            string SampleId=this.txtSampleId.Text;
            string PostBackStatus=this.txtPostBackStatus.Text;
            DateTime PostBackDate=DateTime.Parse(this.txtPostBackDate.Text);

            RuRo.Model.ZSSY.SpecimenRtLog model=new RuRo.Model.ZSSY.SpecimenRtLog();
            model.id=id;
            model.username=username;
            model.PatiendId=PatiendId;
            model.SampleId=SampleId;
            model.PostBackStatus=PostBackStatus;
            model.PostBackDate=PostBackDate;

            RuRo.BLL.ZSSY.SpecimenRtLog bll=new RuRo.BLL.ZSSY.SpecimenRtLog();
            bll.Update(model);
            RuRo.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }