医院健康体检系统

3 篇文章 0 订阅
2 篇文章 0 订阅

查看,写入,修改一个页面:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
        }
    
        .style3
        {
        }
        .style6
        {
        }
        .style7
        {
            width: 94px;
        }
        .style9
        {
            height: 26px;
        }
        .style10
        {
            width: 4px;
            height: 26px;
        }
        .style11
        {
            width: 94px;
            height: 26px;
        }
    
        .style12
        {
            width: 24px;
        }
        .style13
        {
        }
        .style15
        {
            width: 4px;
        }
        .style16
        {
        }
    
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 1003px; margin:0 auto; height: 1321px;">
   
        <table id="tabledisp" runat="server" class="style1" style="border: thin solid #008000">
            <tr>
                <td colspan="2" style="border: thin solid #C0C0C0">
                    姓 名&nbsp;&nbsp;
                    </td>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtname" runat="server"></asp:TextBox>
                </td>
                <td class="style15" style="border: thin solid #C0C0C0">
                    性别</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:RadioButton ID="sex" runat="server" GroupName="0" Text="男"
                        Checked="True" />
                    <asp:RadioButton ID="sex0" runat="server" GroupName="0" Text="女" />
                </td>
                <td class="style7" style="border: thin solid #C0C0C0">
                    出生日期</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtbrithday" runat="server"></asp:TextBox>
                </td>
                <td rowspan="4" style="border: thin solid #C0C0C0">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" colspan="2" style="border: thin solid #C0C0C0">
                    身份证号
                    </td>
                <td class="style2" colspan="11" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtidcard" runat="server" Width="396px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2" colspan="2" style="border: thin solid #C0C0C0">
                    工作单位
                    </td>
                <td class="style2" colspan="11" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtWork" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style9" colspan="2" style="border: thin solid #C0C0C0">
                    出生 地&nbsp;
                    </td>
                <td class="style9" colspan="7" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtchushengdi" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td class="style10" style="border: thin solid #C0C0C0">
                    民族</td>
                <td class="style9" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtmingzu" runat="server" Height="24px" Width="101px"></asp:TextBox>
                </td>
                <td class="style11" style="border: thin solid #C0C0C0">
                    婚否</td>
                <td class="style9" style="border: thin solid #C0C0C0">
                    <asp:CheckBox ID="hf" runat="server" />
                </td>
            </tr>
            <tr>
                <td class="style3" colspan="2" style="border: thin solid #C0C0C0">
                    既往病史</td>
                <td class="style3" colspan="11" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtjwps" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style3" colspan="2" style="border: thin solid #C0C0C0">
                    家族史</td>
                <td class="style3" colspan="11" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtjzs" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style12" rowspan="4" style="border: thin solid #C0C0C0">
                    眼</td>
                <td colspan="4" style="border: thin solid #C0C0C0">
                    裸眼视力</td>
                <td colspan="3" rowspan="3" style="border: thin solid #C0C0C0">
                    左</td>
                <td class="style13" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtzlsl" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td class="style15" rowspan="3" style="border: thin solid #C0C0C0">
                    &nbsp;&nbsp; 右</td>
                <td class="style6" colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtylsl" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td rowspan="4" style="border: thin solid #C0C0C0">
                    医师建议<br />
                    <br />
                    <br />
                    <br />
&nbsp;&nbsp;&nbsp; 签名</td>
            </tr>
            <tr>
                <td colspan="4" style="border: thin solid #C0C0C0">
                    矫正视力</td>
                <td class="style13" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtzjzsl" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td class="style6" colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtyjsl" runat="server" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="border: thin solid #C0C0C0">
                    眼疾</td>
                <td class="style13" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtzyj" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td class="style6" colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtyyj" runat="server" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="border: thin solid #C0C0C0">
                    色觉</td>
                <td colspan="8" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtsj" runat="server" Width="600px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style12" rowspan="6" style="border: thin solid #C0C0C0">
                    耳鼻喉</td>
                <td colspan="4" style="border: thin solid #C0C0C0">
                    听力</td>
                <td colspan="3" rowspan="3" style="border: thin solid #C0C0C0">
                    左</td>
                <td class="style13" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtztl" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td class="style15" rowspan="3" style="border: thin solid #C0C0C0">
                    右</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtytl" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td rowspan="6" style="border: thin solid #C0C0C0">
                    医师建议
                    <br />
                    <br />
&nbsp;&nbsp;&nbsp;
                    <br />
                    <br />
                    <br />
&nbsp;&nbsp;&nbsp; 签名</td>
            </tr>
            <tr>
                <td colspan="4" style="border: thin solid #C0C0C0">
                    耳疾</td>
                <td class="style13" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtzej" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtyej" runat="server" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="border: thin solid #C0C0C0">
                    鼻及鼻窦</td>
                <td class="style13" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtzbd" runat="server" Width="250px"></asp:TextBox>
                </td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtybd" runat="server" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    嗅觉</td>
                <td colspan="9" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtxj" runat="server" Width="600px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    咽</td>
                <td colspan="9" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtyan" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    喉</td>
                <td colspan="9" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txthou" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style12" rowspan="3" style="border: thin solid #C0C0C0">
                    口腔</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    粘膜</td>
                <td colspan="9" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtnm" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    牙及牙龈</td>
                <td colspan="9" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtyyin" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    舌</td>
                <td colspan="9" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtshe" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style12" rowspan="8" style="border: thin solid #C0C0C0">
                    内科</td>
                <td style="border: thin solid #C0C0C0">
                    呼吸</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txthx" runat="server" Height="23px" Width="50px"></asp:TextBox>
                    次/分</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    脉搏</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtmb" runat="server" Height="23px" Width="50px"></asp:TextBox>
                    次/分</td>
                <td class="style15" style="border: thin solid #C0C0C0">
                    血压</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtxya" runat="server" Height="23px" Width="50px"></asp:TextBox>
                    /mHg</td>
                <td rowspan="8" style="border: thin solid #C0C0C0">
                    医师建议<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
&nbsp;&nbsp;&nbsp;&nbsp; 签名</td>
            </tr>
            <tr>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    发育及营养</td>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtfy" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    神经及精神</td>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtsjjs" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    肺及呼吸道</td>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtfhx" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    心脏及血管</td>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtxxg" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    肝、脾、双肾</td>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtgps" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    腹部包块</td>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtfbaok" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    其它</td>
                <td colspan="6" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtqt" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style12" rowspan="6" style="border: thin solid #C0C0C0">
                    外科</td>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    身高</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtsg" runat="server" Width="200px"></asp:TextBox>
                    厘米</td>
                <td class="style15" style="border: thin solid #C0C0C0">
                    体重</td>
                <td class="style16" colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txttz" runat="server" Height="21px" Width="138px"></asp:TextBox>
                    千克</td>
                <td rowspan="6" style="border: thin solid #C0C0C0">
                    医师建议<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp; 签名</td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    皮肤</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtpf" runat="server" Width="200px"></asp:TextBox>
                </td>
                <td class="style15" style="border: thin solid #C0C0C0">
                    淋巴结</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtlbj" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    头、颈</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txttoujing" runat="server" Width="200px"></asp:TextBox>
                </td>
                <td class="style15" style="border: thin solid #C0C0C0">
                    甲状腺</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtjzx" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    脊柱</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtjz" runat="server" Width="200px"></asp:TextBox>
                </td>
                <td class="style15" style="border: thin solid #C0C0C0">
                    四肢</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtsz" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    肛门</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtgmen" runat="server" Width="200px"></asp:TextBox>
                </td>
                <td class="style15" style="border: thin solid #C0C0C0">
                    生殖器</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtszq" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    其它</td>
                <td colspan="5" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtwqt" runat="server" Width="500px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style12" style="border: thin solid #C0C0C0">
                    辅助</td>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    胸片</td>
                <td colspan="5" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtxp" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    医师签名: </td>
            </tr>
            <tr>
                <td class="style12" rowspan="5" style="border: thin solid #C0C0C0">
                    检查结果</td>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    心电图</td>
                <td colspan="5" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtxdt" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    医师签名: </td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    肝功能</td>
                <td colspan="5" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtggn" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    检验师签名: </td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    乙肝两对半</td>
                <td colspan="5" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtyglb" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    检验师签名:&nbsp;&nbsp; </td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    血常规</td>
                <td style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtxcg" runat="server"></asp:TextBox>
                </td>
                <td class="style15" style="border: thin solid #C0C0C0">
                    血型</td>
                <td colspan="3" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtxx" runat="server"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    检验师签名:&nbsp;&nbsp; </td>
            </tr>
            <tr>
                <td colspan="7" style="border: thin solid #C0C0C0">
                    尿常规</td>
                <td colspan="5" style="border: thin solid #C0C0C0">
                    <asp:TextBox ID="txtncg" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td style="border: thin solid #C0C0C0">
                    检验师签名:</td>
            </tr>
        </table>
    <div style=" margin-top:20px; height: 35px; text-align: center;">
        <asp:Button ID="Button1" runat="server" οnclick="Button1_Click" Text="保存" />
        </div>
    </div>
    </form>
</body>
</html>

 

 

 

 

 

后台CS:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Text;

public partial class _Default : System.Web.UI.Page
{
    string strcon = ConfigurationManager.ConnectionStrings["con"].ConnectionString;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["id"]!=null)
            {
                DataTable dt = Method.SQLReturn("select * from my_yiyuan where id=@id",CommandType.Text,new SqlParameter("@id",Request["id"].ToString()));
                if (dt.Rows.Count == 1)
                {
                    txtname.Text=dt.Rows[0][1].ToString();
     string sexa=dt.Rows[0][2].ToString();
                    sex.Checked = true;
                    if (sexa=="0")
                    {
                        sex0.Checked = true;
                    }
                   
     txtbrithday.Text=dt.Rows[0][3].ToString();
     txtidcard.Text=dt.Rows[0][4].ToString();
                    string hf0=dt.Rows[0][5].ToString();
                    if (hf0=="1")
                    {
                        hf.Checked = true;
                    }
     txtWork.Text=dt.Rows[0][6].ToString();
     txtchushengdi.Text=dt.Rows[0][7].ToString();
     txtmingzu.Text=dt.Rows[0][8].ToString();
     txtjwps.Text=dt.Rows[0][9].ToString();
     txtjzs.Text=dt.Rows[0][10].ToString();
     txtzlsl.Text=dt.Rows[0][11].ToString();
     txtzjzsl.Text=dt.Rows[0][12].ToString();
     txtzyj.Text=dt.Rows[0][13].ToString();
     txtylsl.Text=dt.Rows[0][14].ToString();
     txtyjsl.Text=dt.Rows[0][15].ToString();
     txtyyj.Text=dt.Rows[0][16].ToString();
     txtsj.Text=dt.Rows[0][17].ToString();
     txtztl.Text=dt.Rows[0][18].ToString();
     txtzej.Text=dt.Rows[0][19].ToString();
     txtzbd.Text=dt.Rows[0][20].ToString();
     txtytl.Text=dt.Rows[0][21].ToString();
     txtyej.Text=dt.Rows[0][22].ToString();
     txtybd.Text=dt.Rows[0][23].ToString();
     txtxj.Text=dt.Rows[0][24].ToString();
     txtyan.Text=dt.Rows[0][25].ToString();
     txthou.Text=dt.Rows[0][26].ToString();
     txtnm.Text=dt.Rows[0][27].ToString();
     txtyyin.Text=dt.Rows[0][28].ToString();
     txtshe.Text=dt.Rows[0][29].ToString();
        txthx.Text=dt.Rows[0][30].ToString();
     txtmb.Text=dt.Rows[0][31].ToString();
     txtxya.Text=dt.Rows[0][32].ToString();
     txtfy.Text=dt.Rows[0][33].ToString();
     txtsjjs.Text=dt.Rows[0][34].ToString();
     txtfhx.Text=dt.Rows[0][35].ToString();
     txtxxg.Text=dt.Rows[0][36].ToString();
        txtgps.Text=dt.Rows[0][37].ToString();
     txtfbaok.Text=dt.Rows[0][38].ToString();
     txtqt.Text=dt.Rows[0][39].ToString();
     txtsg.Text=dt.Rows[0][40].ToString();
     txttz.Text=dt.Rows[0][41].ToString();
     txtpf.Text=dt.Rows[0][42].ToString();
     txtlbj.Text=dt.Rows[0][43].ToString();
     txttoujing.Text=dt.Rows[0][44].ToString();
     txtjzx.Text=dt.Rows[0][45].ToString();
     txtjz.Text=dt.Rows[0][46].ToString();
     txtsz.Text=dt.Rows[0][47].ToString();
     txtgmen.Text=dt.Rows[0][48].ToString();
     txtszq.Text=dt.Rows[0][49].ToString();
     txtwqt.Text=dt.Rows[0][50].ToString();
        txtxp.Text=dt.Rows[0][51].ToString();
     txtxdt.Text=dt.Rows[0][52].ToString();
     txtggn.Text=dt.Rows[0][53].ToString();
     txtyglb.Text=dt.Rows[0][54].ToString();
     txtxcg.Text=dt.Rows[0][55].ToString();
     txtxx.Text=dt.Rows[0][56].ToString();
                    txtncg.Text = dt.Rows[0][57].ToString();
                    if (Request["sign"] != null)
                    {
                        Button1.Text = "修改";
                    }
                    else
                    {
                        Button1.Text = "返回";
                        tabledisp.Disabled = true;
                    }

                }
                else
                {
                    ClientScript.RegisterClientScriptBlock(GetType(),"aa","<script>alert('数据出现问题请联系管理员')</script>");
                }
            }
           
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Button btn = (Button)sender;
        if (btn.Text == "保存")
        {
            WriteDataBase();
        }
        else if (btn.Text == "修改")
        {
            updateDataBase();
            Server.Transfer("Disp.aspx");
        }
        else
        {
            Server.Transfer("Disp.aspx");
        }
    }

    private void WriteDataBase()
    {
        string sexa = "0";
        if (sex.Checked)
        {
            sexa = "1";
        }
        string hf0 = "0";
        if (hf.Checked)
        {
            hf0 = "1";
        }
        StringBuilder strSql = new StringBuilder();
        strSql.Append("insert into my_yiyuan(");
        strSql.Append("name,sex,brithday,idcard,ishf,workdw,chushengdi,mingzu,jiwangbingshi,jiazushi,zls,zjx,zjj,yls,yjx,yjj,sejue,ztl,zej,zbd,ytl,yej,ybd,xj,y,h,nm,yyin,she,huxi,maibo,xueya,fayue,shenjing,feihuxidao,xinzangxueguan,ganpishen,fubobaokuai,neiqita,shengao,tizhong,pifu,libajie,toujing,jiazhuangxian,jizhu,sizhi,gangmen,shengzhiqi,waiqita,xiongpian,xindiantu,gangongneng,yiganliandiuban,xuechanggui,xuexing,niaochanggui)");
        strSql.Append(" values (");
        strSql.Append("@name,@sex,@brithday,@idcard,@ishf,@workdw,@chushengdi,@mingzu,@jiwangbingshi,@jiazushi,@zls,@zjx,@zjj,@yls,@yjx,@yjj,@sejue,@ztl,@zej,@zbd,@ytl,@yej,@ybd,@xj,@y,@h,@nm,@yyin,@she,@huxi,@maibo,@xueya,@fayue,@shenjing,@feihuxidao,@xinzangxueguan,@ganpishen,@fubobaokuai,@neiqita,@shengao,@tizhong,@pifu,@libajie,@toujing,@jiazhuangxian,@jizhu,@sizhi,@gangmen,@shengzhiqi,@waiqita,@xiongpian,@xindiantu,@gangongneng,@yiganliandiuban,@xuechanggui,@xuexing,@niaochanggui)");
        SqlParameter[] parameters = {
     new SqlParameter("@name", txtname.Text.Trim()),
     new SqlParameter("@sex",sexa),
     new SqlParameter("@brithday", txtbrithday.Text.Trim()),
     new SqlParameter("@idcard",txtidcard.Text.Trim()),
                    new SqlParameter("@ishf",hf0),
     new SqlParameter("@workdw", txtWork.Text.Trim()),
     new SqlParameter("@chushengdi",txtchushengdi.Text.Trim()),
     new SqlParameter("@mingzu",txtmingzu.Text.Trim()),
     new SqlParameter("@jiwangbingshi",txtjwps.Text.Trim()),
     new SqlParameter("@jiazushi",txtjzs.Text.Trim()),
     new SqlParameter("@zls", txtzlsl.Text.Trim()),
     new SqlParameter("@zjx",txtzjzsl.Text.Trim()),
     new SqlParameter("@zjj",txtzyj.Text.Trim()),
     new SqlParameter("@yls",txtylsl.Text.Trim()),
     new SqlParameter("@yjx", txtyjsl.Text.Trim()),
     new SqlParameter("@yjj", txtyyj.Text.Trim()),
     new SqlParameter("@sejue", txtsj.Text.Trim()),
     new SqlParameter("@ztl", txtztl.Text.Trim()),
     new SqlParameter("@zej", txtzej.Text.Trim()),
     new SqlParameter("@zbd",txtzbd.Text.Trim()),
     new SqlParameter("@ytl", txtytl.Text.Trim()),
     new SqlParameter("@yej", txtyej.Text.Trim()),
     new SqlParameter("@ybd", txtybd.Text.Trim()),
     new SqlParameter("@xj", txtxj.Text.Trim()),
     new SqlParameter("@y", txtyan.Text.Trim()),
     new SqlParameter("@h", txthou.Text.Trim()),
     new SqlParameter("@nm", txtnm.Text.Trim()),
     new SqlParameter("@yyin", txtyyin.Text.Trim()),
     new SqlParameter("@she", txtshe.Text.Trim()),
     new SqlParameter("@huxi", txthx.Text.Trim()),
     new SqlParameter("@maibo", txtmb.Text.Trim()),
     new SqlParameter("@xueya", txtxya.Text.Trim()),
     new SqlParameter("@fayue", txtfy.Text.Trim()),
     new SqlParameter("@shenjing", txtsjjs.Text.Trim()),
     new SqlParameter("@feihuxidao",txtfhx.Text.Trim()),
     new SqlParameter("@xinzangxueguan", txtxxg.Text.Trim()),
     new SqlParameter("@ganpishen", txtgps.Text.Trim()),
     new SqlParameter("@fubobaokuai", txtfbaok.Text.Trim()),
     new SqlParameter("@neiqita", txtqt.Text.Trim()),
     new SqlParameter("@shengao", txtsg.Text.Trim()),
     new SqlParameter("@tizhong",txttz.Text.Trim()),
     new SqlParameter("@pifu", txtpf.Text.Trim()),
     new SqlParameter("@libajie", txtlbj.Text.Trim()),
     new SqlParameter("@toujing", txttoujing.Text.Trim()),
     new SqlParameter("@jiazhuangxian", txtjzx.Text.Trim()),
     new SqlParameter("@jizhu", txtjz.Text.Trim()),
     new SqlParameter("@sizhi", txtsz.Text.Trim()),
     new SqlParameter("@gangmen", txtgmen.Text.Trim()),
     new SqlParameter("@shengzhiqi", txtszq.Text.Trim()),
     new SqlParameter("@waiqita", txtwqt.Text.Trim()),
     new SqlParameter("@xiongpian", txtxp.Text.Trim()),
     new SqlParameter("@xindiantu", txtxdt.Text.Trim()),
     new SqlParameter("@gangongneng", txtggn.Text.Trim()),
     new SqlParameter("@yiganliandiuban", txtyglb.Text.Trim()),
     new SqlParameter("@xuechanggui", txtxcg.Text.Trim()),
     new SqlParameter("@xuexing", txtxx.Text.Trim()),
     new SqlParameter("@niaochanggui", txtncg.Text.Trim())};
        Method.SQLExecute(strSql.ToString(), CommandType.Text, parameters);
        ClientScript.RegisterClientScriptBlock(GetType(), "aaa", "<script>alert('写入成功!')</script>");

    }

    private void updateDataBase()
    {

       string sexa = "0";
       if (sex.Checked)
       {
           sexa = "1";
       }
       string hf0 = "0";
       if (hf.Checked)
       {
           hf0 = "1";
       }


       StringBuilder strSql=new StringBuilder();
   strSql.Append("update my_yiyuan set ");
   strSql.Append("name=@name,");
   strSql.Append("sex=@sex,");
            strSql.Append("brithday=@brithday,");
            strSql.Append("idcard=@idcard,");
            strSql.Append("ishf=@ishf,");
            strSql.Append("workdw=@workdw,");
            strSql.Append("chushengdi=@chushengdi,");
            strSql.Append("mingzu=@mingzu,");
   strSql.Append("jiwangbingshi=@jiwangbingshi,");
   strSql.Append("jiazushi=@jiazushi,");
   strSql.Append("zls=@zls,");
   strSql.Append("zjx=@zjx,");
   strSql.Append("zjj=@zjj,");
   strSql.Append("yls=@yls,");
   strSql.Append("yjx=@yjx,");
   strSql.Append("yjj=@yjj,");
   strSql.Append("sejue=@sejue,");
   strSql.Append("ztl=@ztl,");
   strSql.Append("zej=@zej,");
   strSql.Append("zbd=@zbd,");
   strSql.Append("ytl=@ytl,");
   strSql.Append("yej=@yej,");
   strSql.Append("ybd=@ybd,");
   strSql.Append("xj=@xj,");
   strSql.Append("y=@y,");
   strSql.Append("h=@h,");
   strSql.Append("nm=@nm,");
   strSql.Append("yyin=@yyin,");
   strSql.Append("she=@she,");
   strSql.Append("huxi=@huxi,");
   strSql.Append("maibo=@maibo,");
   strSql.Append("xueya=@xueya,");
   strSql.Append("fayue=@fayue,");
   strSql.Append("shenjing=@shenjing,");
   strSql.Append("feihuxidao=@feihuxidao,");
   strSql.Append("xinzangxueguan=@xinzangxueguan,");
   strSql.Append("ganpishen=@ganpishen,");
   strSql.Append("fubobaokuai=@fubobaokuai,");
   strSql.Append("neiqita=@neiqita,");
   strSql.Append("shengao=@shengao,");
   strSql.Append("tizhong=@tizhong,");
   strSql.Append("pifu=@pifu,");
   strSql.Append("libajie=@libajie,");
   strSql.Append("toujing=@toujing,");
   strSql.Append("jiazhuangxian=@jiazhuangxian,");
   strSql.Append("jizhu=@jizhu,");
   strSql.Append("sizhi=@sizhi,");
   strSql.Append("gangmen=@gangmen,");
   strSql.Append("shengzhiqi=@shengzhiqi,");
   strSql.Append("waiqita=@waiqita,");
   strSql.Append("xiongpian=@xiongpian,");
   strSql.Append("xindiantu=@xindiantu,");
   strSql.Append("gangongneng=@gangongneng,");
   strSql.Append("yiganliandiuban=@yiganliandiuban,");
   strSql.Append("xuechanggui=@xuechanggui,");
   strSql.Append("xuexing=@xuexing,");
   strSql.Append("niaochanggui=@niaochanggui");
   strSql.Append(" where id=@id ");


            SqlParameter[] parameters = {
     new SqlParameter("@name", txtname.Text.Trim()),
     new SqlParameter("@sex",sexa),
     new SqlParameter("@brithday", txtbrithday.Text.Trim()),
     new SqlParameter("@idcard",txtidcard.Text.Trim()),
                    new SqlParameter("@ishf",hf0),
     new SqlParameter("@workdw", txtWork.Text.Trim()),
     new SqlParameter("@chushengdi",txtchushengdi.Text.Trim()),
     new SqlParameter("@mingzu",txtmingzu.Text.Trim()),
     new SqlParameter("@jiwangbingshi",txtjwps.Text.Trim()),
     new SqlParameter("@jiazushi",txtjzs.Text.Trim()),
     new SqlParameter("@zls", txtzlsl.Text.Trim()),
     new SqlParameter("@zjx",txtzjzsl.Text.Trim()),
     new SqlParameter("@zjj",txtzyj.Text.Trim()),
     new SqlParameter("@yls",txtylsl.Text.Trim()),
     new SqlParameter("@yjx", txtyjsl.Text.Trim()),
     new SqlParameter("@yjj", txtyyj.Text.Trim()),
     new SqlParameter("@sejue", txtsj.Text.Trim()),
     new SqlParameter("@ztl", txtztl.Text.Trim()),
     new SqlParameter("@zej", txtzej.Text.Trim()),
     new SqlParameter("@zbd",txtzbd.Text.Trim()),
     new SqlParameter("@ytl", txtytl.Text.Trim()),
     new SqlParameter("@yej", txtyej.Text.Trim()),
     new SqlParameter("@ybd", txtybd.Text.Trim()),
     new SqlParameter("@xj", txtxj.Text.Trim()),
     new SqlParameter("@y", txtyan.Text.Trim()),
     new SqlParameter("@h", txthou.Text.Trim()),
     new SqlParameter("@nm", txtnm.Text.Trim()),
     new SqlParameter("@yyin", txtyyin.Text.Trim()),
     new SqlParameter("@she", txtshe.Text.Trim()),
     new SqlParameter("@huxi", txthx.Text.Trim()),
     new SqlParameter("@maibo", txtmb.Text.Trim()),
     new SqlParameter("@xueya", txtxya.Text.Trim()),
     new SqlParameter("@fayue", txtfy.Text.Trim()),
     new SqlParameter("@shenjing", txtsjjs.Text.Trim()),
     new SqlParameter("@feihuxidao",txtfhx.Text.Trim()),
     new SqlParameter("@xinzangxueguan", txtxxg.Text.Trim()),
     new SqlParameter("@ganpishen", txtgps.Text.Trim()),
     new SqlParameter("@fubobaokuai", txtfbaok.Text.Trim()),
     new SqlParameter("@neiqita", txtqt.Text.Trim()),
     new SqlParameter("@shengao", txtsg.Text.Trim()),
     new SqlParameter("@tizhong",txttz.Text.Trim()),
     new SqlParameter("@pifu", txtpf.Text.Trim()),
     new SqlParameter("@libajie", txtlbj.Text.Trim()),
     new SqlParameter("@toujing", txttoujing.Text.Trim()),
     new SqlParameter("@jiazhuangxian", txtjzx.Text.Trim()),
     new SqlParameter("@jizhu", txtjz.Text.Trim()),
     new SqlParameter("@sizhi", txtsz.Text.Trim()),
     new SqlParameter("@gangmen", txtgmen.Text.Trim()),
     new SqlParameter("@shengzhiqi", txtszq.Text.Trim()),
     new SqlParameter("@waiqita", txtwqt.Text.Trim()),
     new SqlParameter("@xiongpian", txtxp.Text.Trim()),
     new SqlParameter("@xindiantu", txtxdt.Text.Trim()),
     new SqlParameter("@gangongneng", txtggn.Text.Trim()),
     new SqlParameter("@yiganliandiuban", txtyglb.Text.Trim()),
     new SqlParameter("@xuechanggui", txtxcg.Text.Trim()),
     new SqlParameter("@xuexing", txtxx.Text.Trim()),
     new SqlParameter("@niaochanggui", txtncg.Text.Trim()),
                    new SqlParameter("@id", Request["id"].ToString())
                                       
                                        };
            Method.SQLExecute(strSql.ToString(), CommandType.Text, parameters);
            ClientScript.RegisterClientScriptBlock(GetType(), "aaa", "<script>alert('修改成功!')</script>");

 

 

   
   }


}

前台html:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Disp.aspx.cs" Inherits="Disp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            font-size: small;
        }
    </style>
    <script src="Scripts/jquery-1.7.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#Checkbox1").click(function () {
                $("#GridView1 tr input[id!=Checkbox1]").attr("checked",this.checked);
            })

        })
   
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button ID="Button1" runat="server" Text="删除选中项" οnclick="Button1_Click" />
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Button ID="Button2" runat="server" οnclick="Button2_Click" Text="查找" />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
            Width="748px" style="text-align: center"
            onrowcommand="GridView1_RowCommand">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox2" runat="server" />
                    </ItemTemplate>
                    <HeaderTemplate>
                        <input id="Checkbox1" type="checkbox" />
                    </HeaderTemplate>
                </asp:TemplateField>
                <asp:HyperLinkField HeaderText="姓名" DataNavigateUrlFields="id"
                    DataNavigateUrlFormatString="Default.aspx?id={0}" DataTextField="name" />
                <asp:TemplateField HeaderText="性别">
                    <ItemTemplate>
                       <%# Convert.ToBoolean(Eval("sex"))?"男":"女" %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="mingzu" HeaderText="民族" />
                <asp:TemplateField HeaderText="婚否">
                    <ItemTemplate>
                        <%# Convert.ToBoolean(Eval("ishf"))?"已婚":"未婚" %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="brithday" HeaderText="出生日期" />
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server"  CommandArgument='<%# Eval("id") %>'
                            CssClass="style1" CommandName="ed">[修改]</asp:LinkButton>
                        <asp:LinkButton ID="LinkButton2" runat="server"
                            CommandArgument='<%# Eval("id") %>' CssClass="style1" CommandName="del">[删除]</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
   
    </div>
    </form>
</body>
</html>

后台CS:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;


public partial class Disp : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
          
            ViewState["sql"] = "select * from my_yiyuan";
            DataBindGrid();
        }
     
    }

    protected void DataBindGrid()
    {
      DataTable dt =  Method.SQLReturn(ViewState["sql"].ToString(),CommandType.Text);
      GridView1.DataSource = dt;
      GridView1.DataBind();
     
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int i=0;
        foreach (GridViewRow item in GridView1.Rows)
        {
            CheckBox cb = item.Cells[0].FindControl("CheckBox2") as CheckBox;
            if (cb == null)
            {
                return;
            }
            LinkButton link = item.Cells[6].FindControl("LinkButton1") as LinkButton;
            if (link == null)
            {
                return;
            }
            if (cb.Checked)
            {

                Method.SQLExecute("delete from my_yiyuan where id=@id", CommandType.Text, new SqlParameter("@id", link.CommandArgument.ToString()));
                i++;
            }

        }
        ClientScript.RegisterClientScriptBlock(GetType(),"aa","<script>alert('已经成功删除了"+i.ToString()+"条记录')</script>");
        DataBindGrid();
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName=="ed")
        {
            Server.Transfer("Default.aspx?id="+e.CommandArgument+"&sign=0");
        }
        else if (e.CommandName == "del")
        {
            Method.SQLExecute("delete from my_yiyuan where id=@id",CommandType.Text,new SqlParameter("@id",e.CommandArgument));
        }
        DataBindGrid();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        ViewState["sql"] = "select * from my_yiyuan where name like '%"+TextBox1.Text.Trim()+"%'";
        DataBindGrid();
    }
}

 

 

 

 

健康体检管理软件 是一套完整的数字化健康体检中心管理软件 , 该系 统本着从体检中心检查的实际应用出发,根据体检人员相对集中进行,人员分布 不均,体检过程相对程序化,重点解决了体检流程化问题,把体检信息采集源放 在各体检科室的医生工作台上,各种设备检查信息全部来源与相关医疗设备,使 体检人员的全部检查信息贯穿在系统工作流的全过程,使其真正成为从采集体检 人员的基本信息-相关科室体检信息-设备采集信息-体检信息综合分析-个人 / 集体综合统计分析及健康状况总结分析等,完全的计算机综合管理过程。 <<健康体检管理软件 >>是如何产生的呢 ? 健康已成为现代社会人们日益关 心的问题 , 如何知道自己是否有健康的体魄 ? 用人单位如何知道所雇佣的人是 否健康 ? 学生入学 , 工厂招工 , 接触有害物质人员的定期检查等等 , 都离不 开医院体检 . 因此 , 目前专门的体检医院或化出一个部门用于体检医院 , 象雨后的春笋越来越多,那么 , 一个体检医院 , 如何有效的利用现有资源 , 如 何面对大批量人员的体检 , 如何给被检人员准确 , 快捷做出检查结果 , 如何建 立并有效的管理自己日益庞大的体检档案 , 将是医院面邻的越来越严峻的问题。 完成一个单位的体检后,系统根据体检结果,综合做出该单位的体检分析,健康 建议分析,职业病分布状况分析等。体检结果可通过 INTERNET 方便的传递给相 关单位。长期的档案的管理,体检信息的综合查询,为长期跟踪观察某单位员工 健康状况提供一手资料。 功能特点 采用B/S和C/S相结合的网络模式:内网实现体检中心的业务管理;外网实现体检客 户网上预约,网上查询等。 采用体检条码或磁卡的管理技术:对体检号采用条形码或磁卡的管理。由于体检 号贯穿于系统始终,可通过对条码或磁卡的扫描读取,大大减少了人工输入的出 错率,同时也方便了结果的录入和数据的查询。 强大的自定义功能:一个好的软件,要最大限度满足最多用户的需求,要求软件 的通用性足够强大。体检管理软件采用大量自定义设置,可以通过简单的应用前 初始化设置。达到适用不同规模、流程与要求的体检中心的业务需求,从而实现 软件的高性价比。这样的软件也具有容易升级,易维护的特点。 软件具有智能化:由于体检业务是一项工作量烦重的业务。从检前准备,检中检 查,检后服务,每一过程都有大量工作要作。这就要求体检管理软件智能化。开 发人员深入工作现场,了解体检医生的工作情况,在软件的各个部分都有智能化 的表现,如:可以自动判断阳性结果;自动生成小结;自动生成总结;自动生成 建议;批量导入人员名单,批量登记,批量报告打印等等,总之,你会发现无处 不为您所想。 与检验系统、检查仪器的对接:对于每天大量的检查结果,凭人工录入,是一件 非常头痛的工作,而且非常容易出错,<>实现500人检验数据(约 合3万条记录),不足30秒,可以全部录入完成。 灵活独立的计价收费系统系统自身具有独立的计价收费功能,专们针对散检和
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值