⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 diagnoserecords.aspx.cs

📁 实现电子病历功能 有医生护士等角色 分别可以增加病历修改病历删除病历等等功能 等等
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Src_IndividualOperation_EMR_DiagnoseRecord : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            identitycardNum = Request.QueryString["identitycardNum"].ToString();
            patientName = Request.QueryString["patientName"].ToString();
            recordID = Request.QueryString["recordID"].ToString();
            init(identitycardNum, patientName, recordID);
        }
    }
    protected static string identitycardNum = "";
    protected static string patientName = "";
    protected static string recordID = ""; 
   
    private static ArrayList diagnoserecordList ;
    private void init(string identitycardNum, string patientName, string recordID)
    {
        diagnoserecordList = DoctorService.getDiagnose(identitycardNum, patientName, recordID);
        Application.Clear();
        if (diagnoserecordList != null && diagnoserecordList.Count > 0)
        {
            Application.Add("Diagnose", diagnoserecordList);

            ps = new PagedDataSource();
            ps.DataSource = diagnoserecordList;
            ps.AllowPaging = true;
            ps.PageSize = 6;
            DataListDiagnoseRecord.DataSource = ps;
            DataListDiagnoseRecord.DataBind();

            LabelRecordTotal.Text = diagnoserecordList.Count.ToString();
            LabelRecordPages.Text = Math.Round(diagnoserecordList.Count / ps.PageSize + 0.5001).ToString();
            LabelRecordPage.Text = "1";
            ButtonPre.Visible = false;
            if (Math.Round(diagnoserecordList.Count / 6 + 0.5) < 2)
            {
                ButtonNext.Visible = false;
            }
        }
        else
        {
          string  redirect = Request.ApplicationPath + "/Src/IndividualOperation/";
            UserInfo user = (UserInfo)Session["user"];
            if (user.IsDoctor)
            {
                redirect = redirect + "Doctor/";
            }
            if (user.IsLeader)
            {
                redirect = redirect + "Leader/";
            }
            if (user.IsNurse)
            {
                redirect = redirect + "Nurse/";
            }
            redirect = redirect + "CheckEMR.aspx";
            Response.Write(@"<script language='Javascript'>
                 alert('你输入的身份证号,姓名和RecordID不正确!');window.location.href='"+redirect+"';</script>");
       
        }
    }
    private static PagedDataSource ps;

    protected void ButtonPre_Click(object sender, EventArgs e)
    {
        LabelRecordPage.Text = ps.CurrentPageIndex.ToString();
        ps.CurrentPageIndex--;
        DataListDiagnoseRecord.DataSource = ps;
        DataListDiagnoseRecord.DataBind();
        ButtonNext.Visible = true;
        if (ps.CurrentPageIndex == 0)
        {
            ButtonPre.Visible = false;
        }
    }
    protected void ButtonNext_Click(object sender, EventArgs e)
    {
        ps.CurrentPageIndex++;
        int countPage = ps.CurrentPageIndex + 1;
        LabelRecordPage.Text = countPage.ToString();
        DataListDiagnoseRecord.DataSource = ps;
        DataListDiagnoseRecord.DataBind();
        ButtonPre.Visible = true;
        if (countPage == Convert.ToInt32(LabelRecordPages.Text))
        {
            ButtonNext.Visible = false;
        }
    }   
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -