示例#1
0
    /// <summary>
    /// 填充检查科室界面
    /// </summary>
    private void SetUserUI()
    {
        Maticsoft.Model.Examination.advise model = bll.GetModel(Id);

        if (model == null)
        {
            return;
        }
        txtRegisterNo.Text = model.RegisterNo;

        txtName.Text          = model.Name;
        txtSummary.Text       = model.Summary;
        txtContent.Text       = model.content;
        txtContent2.Text      = model.content2;
        txtContent3.Text      = model.content3;
        txtDoctor.Text        = model.Doctor;
        txtInvestigation.Text = model.investigation;
        txtadd_time.Text      = model.add_time.ToString();
    }
示例#2
0
    protected void btnSaveUser_Click(object sender, EventArgs e)
    {
        Maticsoft.Model.Examination.advise model = new Maticsoft.Model.Examination.advise();

        model.id            = Id;
        model.RegisterNo    = txtRegisterNo.Text;
        model.Name          = txtName.Text;
        model.Summary       = txtSummary.Text;
        model.content       = txtContent.Text;
        model.content2      = txtContent2.Text;
        model.content3      = txtContent3.Text;
        model.Doctor        = txtDoctor.Text;
        model.investigation = txtInvestigation.Text;

        model.add_time = DateTime.Now;

        bool Succeed = true;

        if (Id == 0)
        {
            Succeed = bll.Add(model);
        }
        else
        {
            Succeed = bll.Update(model);
        }



        if (Succeed)
        {
            ShowMessage("数据保存成功!");
        }
        else
        {
            ShowMessage("数据保存成功!");
        }

        DataBind();
        SetUIState("Default");
    }
示例#3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.Examination.advise model)
 {
     return(dal.Update(model));
 }
示例#4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Maticsoft.Model.Examination.advise model)
 {
     return(dal.Add(model));
 }