醫(yī)院管理系統(tǒng)源代碼_第1頁
醫(yī)院管理系統(tǒng)源代碼_第2頁
醫(yī)院管理系統(tǒng)源代碼_第3頁
醫(yī)院管理系統(tǒng)源代碼_第4頁
醫(yī)院管理系統(tǒng)源代碼_第5頁
已閱讀5頁,還剩133頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

醫(yī)院管理系統(tǒng)源代碼醫(yī)院管理系統(tǒng)源代碼醫(yī)院管理系統(tǒng)源代碼資料僅供參考文件編號:2022年4月醫(yī)院管理系統(tǒng)源代碼版本號:A修改號:1頁次:1.0審核:批準:發(fā)布日期:源代碼登陸界面源代碼:<%@PageLanguage="C#"MasterPageFile="~/MasterPage.master"AutoEventWireup="true"CodeFile="login.aspx.cs"Inherits="logn"Title="UntitledPage"%><asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server"><asp:ImageID="Image1"runat="server"Height="360px"ImageUrl="~/7.jpg"Width="298px"/></asp:Content><asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder2"Runat="Server"><asp:LinkButtonID="LinkButton2"runat="server"onclick="LinkButton2_Click">用戶請登錄</asp:LinkButton><br/><asp:LinkButtonID="LinkButton1"runat="server"onclick="LinkButton1_Click">注冊用戶</asp:LinkButton><asp:PanelID="Panel1"runat="server"Width="254px"><strong>登錄</strong><br/>用戶名:<asp:TextBoxID="TextBox5"runat="server"></asp:TextBox><br/><asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="TextBox5"Display="Dynamic"ErrorMessage="用戶名不能為空"ForeColor="Red"></asp:RequiredFieldValidator><br/>密碼:<asp:TextBoxID="TextBox6"runat="server"TextMOde="Password"></asp:TextBox><br/><asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"ErrorMessage="密碼不能為空"ForeColor="Red"ConTrolToValidate="TextBox6"Display="Dynamic"></asp:RequiredFieldValidator><br/><asp:ButtonID="Button3"runat="server"Text="登錄"onclick="Button1_Click"PostBackUrl="~/main.aspx"/><asp:LabelID="Label1"runat="server"Text=""></asp:Label></asp:Panel><asp:PanelID="Panel2"runat="server"><strong>新用戶請注冊</strong>                 用戶名:<asp:TextBoxID="TextBox7"runat="server"></asp:TextBox><br/><asp:RequiredFieldValidatorID="RequiredFieldValidator3"runat="server"ControlToValidate="TextBox7"Display="Dynamic"ErrorMessage="用戶名不能為空"ForeColor="Red"></asp:RequiredFieldValidator><br/>密碼:<asp:TextBoxID="TextBox8"runat="server"TextMOde="Password"></asp:TextBox><br/><asp:RequiredFieldValidatorID="RequiredFieldValidator4"runat="server"ErrorMessage="密碼不能為空"ForeColor="Red"ConTrolToValidate="TextBox8"Display="Dynamic"></asp:RequiredFieldValidator><br/><asp:ButtonID="Button2"runat="server"Text="注冊"onclick="Button2_Click"/><asp:LabelID="Label2"runat="server"Text=""></asp:Label></asp:Panel></asp:Content>窗體發(fā)生代碼:usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;publicpartialclasslogn:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){Panel1.Visible=false;Panel2.Visible=false;}}protectedvoidLinkButton2_Click(objectsender,EventArgse){Panel1.Visible=true;Panel2.Visible=false;}protectedvoidLinkButton1_Click(objectsender,EventArgse){Panel1.Visible=false;Panel2.Visible=true;}protectedvoidButton1_Click(objectsender,EventArgse){if(TextBox5.Text==""&&TextBox6.Text==""){Label1.Text="歡迎你,登錄成功";}else{Label1.Text="你輸入的用戶名錯誤或密碼錯誤,請重新輸入";}}protectedvoidButton2_Click(objectsender,EventArgse){if(TextBox7.Text==""&&TextBox8.Text==""){Label2.Text="歡迎你,注冊成功";}else{Label2.Text="請輸入用戶名和密碼";}}}主界面源代碼:<%@PageLanguage="C#"MasterPageFile="~/MasterPage2.master"AutoEventWireup="true"CodeFile="main.aspx.cs"Inherits="Default2"Title="UntitledPage"%><asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server"> <asp:MenuID="Menu1"runat="server"BackColor="#FFFBD6"DynamicHorizontalOffset="2"Font-Names="Verdana"Font-Size="Larger"ForeColor="#990000"StaticSubMenuIndent="10px"Height="132px"Width="161px"Font-Underline="True"><StaticSelectedStyleBackColor="#FFCC66"/><StaticMenuItemStyleHorizontalPadding="5px"VerticalPadding="2px"/><DynamicHoverStyleBackColor="#990000"ForeColor="White"/><DynamicMenuStyleBackColor="#FFFBD6"/><DynamicSelectedStyleBackColor="#FFCC66"/><DynamicMenuItemStyleHorizontalPadding="5px"VerticalPadding="2px"/><StaticHoverStyleBackColor="#990000"ForeColor="White"/><Items><asp:MenuItemText="首頁"Value="首頁"></asp:MenuItem><asp:MenuItemText="系統(tǒng)管理"Value="系統(tǒng)管理"><asp:MenuItemNavigateUrl="~/ChangePassword.aspx"Text="用戶修改密碼"Value="用戶修改密碼"></asp:MenuItem><asp:MenuItemNavigateUrl="~/UserManage.aspx"Text="用戶權(quán)限設(shè)置"Value="用戶權(quán)限設(shè)置"></asp:MenuItem></asp:MenuItem><asp:MenuItemText="掛號信息管理"Value="掛號信息管理"><asp:MenuItemNavigateUrl="~/RegisteredQuery.aspx"Text="掛號信息查詢"Value="掛號信息登記"></asp:MenuItem><asp:MenuItemNavigateUrl="~/RegisteredAdd.aspx"Text="登記掛號信息"Value="登記掛號信息"></asp:MenuItem></asp:MenuItem><asp:MenuItemText="藥品信息管理"Value="藥品信息管理"><asp:MenuItemNavigateUrl="~/MedicineManage.aspx"Text="藥品查詢信息"Value="藥品查詢信息"></asp:MenuItem><asp:MenuItemNavigateUrl="~/MedicineAdd.aspx"Text="添加藥品信息"Value="添加藥品信息"></asp:MenuItem></asp:MenuItem><asp:MenuItemText="住院信息管理"Value="住院信息管理"><asp:MenuItemNavigateUrl="~/PatientQuery.aspx"Text="查詢住院信息"Value="查詢住院信息"></asp:MenuItem><asp:MenuItemNavigateUrl="~/PatientAdd.aspx"Text="住院信息登記"Value="住院信息登記"></asp:MenuItem></asp:MenuItem><asp:MenuItemNavigateUrl="~/Login.aspx"Text="退出"Value="退出"></asp:MenuItem></Items></asp:Menu><br/>院內(nèi)通知<br/><spanstyle="display:inline!important;float:none;word-spacing:0px;font:14px/25px宋體,Arial,Helvetica,sans-serif;text-transform:none;color:rgb(0,0,0);text-indent:28px;white-space:normal;letter-spacing:normal;background-color:rgb(247,252,255);text-align:left;orphans:auto;widows:auto;webkit-text-stroke-width:0px">為進一步完善危重孕產(chǎn)婦的救治工作,保護母嬰健康,維護社會與家庭的和諧,我局特制定了《市危重孕產(chǎn)婦會診、轉(zhuǎn)診工作原則與處置流程》,現(xiàn)下發(fā)給你們,并就進一步做好有關(guān)工作提出如下要求:加強組織管理,進一步聚焦“一高一低”各級衛(wèi)生行政部門和各有關(guān)醫(yī)療衛(wèi)生單位要充分認識聚焦“一高一低”工作…</span></asp:Content><asp:ContentID="Content2"ContentPlaceHolderID="ContentPlaceHolder2"Runat="Server"><br/><br/><br/><br/><asp:LabelID="Label1"runat="server"Font-Size="XX-Large"ForeColor="#804000"Text="歡迎進入XXX醫(yī)院"></asp:Label></asp:Content>出院信息登記頁面源代碼<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="InhospitalInfoUpdate.aspx.cs"Inherits="InhospitalInfoUpdate"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="/1999/xhtml"><headid="Head1"runat="server"><title></title><styletype="text/css">.STYLE1{color:#FF0000}body,td,th{ font-size:9pt;}body{ margin-left:0px; margin-right:0px; margin-bottom:0px; margin-top:0px;}.style7{height:24px;font-size:large;font-weight:bold;text-align:center;color:#FFFFFF;}</style></head><bodybackground="11.jpg"><formid="Form1"method="post"runat="server"><br/><asp:ImageID="Image1"runat="server"Height="111px"ImageUrl="~/10.jpg"Width="810px"/><br/><tablewidth="600"border="0"cellpadding="0"cellspacing="0"align="center"><trbgcolor="#33b7f9"> <tdclass="style7">出院信息登記</td></tr><tr><tdstyle="background-color:lime"> <br/>姓名: <asp:LabelID="Name"runat="server"Text="Label"></asp:Label><br/><br/>性別: <asp:LabelID="Sex"runat="server"Text="Label"></asp:Label><br/><br/>年齡:<asp:LabelID="Age"runat="server"Text="Label"></asp:Label><br/><br/>病房:<asp:LabelID="RoomNo"runat="server"Text="Label"></asp:Label><br/><br/>入院日期:<asp:LabelID="ArrivelTime"runat="server"Text="Label"></asp:Label><br/><br/>住院費:<asp:TextBoxID="Money"runat="server"Width="105px"></asp:TextBox>元<br/><br/>      <asp:ButtonID="Button1"runat="server"ForeColor="Red"Text="登記"/><asp:ButtonID="Button2"runat="server"ForeColor="Red"PostBackUrl="~/main.aspx"Text="返回"/></tr></table>  </form></body></html>修改密碼頁面源代碼<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="ChangePassword.aspx.cs"Inherits="ChangePassword"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="/1999/xhtml"><headid="Head1"runat="server"><title></title><styletype="text/css">.STYLE1{color:#FF0000}body,td,th{ font-size:9pt;}body{ margin-left:0px; margin-right:0px; margin-bottom:0px; margin-top:0px;}.style1{font-weight:bold;font-size:large;text-align:center;color:#FFFFFF;}.style2{text-align:center;}</style></head><bodybackground="11.jpg"><formid="Form1"name="form1"method="post"runat=server><asp:ImageMapID="ImageMap1"runat="server"Height="135px"ImageUrl="~/10.jpg"Width="812px"></asp:ImageMap><br/><tablewidth="55%"border="1"cellpadding="0"cellspacing="2"align="center"style="height:31px"><trbgcolor="#33b7f9"><tdclass="style1"style="width:387px">修改密碼</td></tr></table><tablewidth="55%"border="1"cellspacing="0"cellpadding="0"align="center"style="background-color:#f6fdfd"><tr><td> <tablewidth="100%"border="1"cellspacing="1"cellpadding="2"align="center"> <tr><tdclass="style2"style="height:44px">輸入修改的密碼</td> <tdclass="style2"style="height:44px"><asp:TextBoxID="NewPassword"runat="server"TextMode="Password"Width="144px"></asp:TextBox><asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="NewPassword"ErrorMessage="密碼輸入不能為空!"></asp:RequiredFieldValidator>    </td></tr> <tr> <tdclass="style2">確認修改的密碼:</td> <tdclass="style2"><asp:TextBoxID="NewPasswordAgain"runat="server"TextMode="Password"Width="145px"></asp:TextBox><asp:CompareValidatorID="CompareValidator1"runat="server"ControlToCompare="NewPassword"ControlToValidate="NewPasswordAgain"ErrorMessage="兩次密碼輸入不一致!"></asp:CompareValidator></td> </tr><tr><tdheight="30"colspan="4"class="style2"><asp:ButtonID="Button1"runat="server"Text="提交"/>       <asp:HyperLinkID="HyperLink1"runat="server"NavigateUrl="main.aspx">返回首頁</asp:HyperLink><br/><asp:LiteralID="ErrMessage"runat="server"></asp:Literal></td></tr> </table> </td></tr> </table></form></body></html>添加藥品頁面源代碼<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="MedicineAdd.aspx.cs"Inherits="MedicineAdd"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="/1999/xhtml"><headid="Head1"runat="server"><title></title><styletype="text/css">.STYLE1{color:#FF0000}body,td,th{ font-size:9pt;}body{ margin-left:0px; margin-right:0px; margin-bottom:0px; margin-top:0px;}.style7{height:20px;font-size:large;font-weight:bold;color:#FFFFFF;text-align:center;}</style></head><bodybackground="11.jpg"><formid="Form1"method="post"runat="server"><br/><asp:ImageID="Image1"runat="server"Height="106px"ImageUrl="~/10.jpg"Width="811px"/><br/><tablewidth=600border=0cellpadding=0cellspacing=0align="center"><trbgcolor="#33b7f9"> <tdclass="style7">添加藥品信息</td></tr><tr><tdstyle="height:42px;background-color:gray"><br/>藥品名稱:<asp:TextBoxID="MedicineName"runat="server"Width="81px"></asp:TextBox><asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="MedicineName"ErrorMessage="藥品名稱必填!"></asp:RequiredFieldValidator><br/><br/>藥品數(shù)量:<asp:TextBoxID="Count"runat="server"Width="81px"></asp:TextBox><br/><br/>藥品單價:<asp:TextBoxID="Price"runat="server"Width="81px"></asp:TextBox>元<br/><br/>藥品單位:<asp:TextBoxID="Unit"runat="server"Width="81px"></asp:TextBox><br/><br/>批文編號:<asp:TextBoxID="ApprovalNumber"runat="server"Width="81px"></asp:TextBox><br/><br/>藥品功效:<asp:TextBoxID="Efficacy"runat="server"Height="54px"TextMode="MultiLine"Width="185px"></asp:TextBox><br/><br/>藥品成份:<asp:TextBoxID="Ingredient"runat="server"Height="54px"TextMode="MultiLine"Width="185px"></asp:TextBox><br/><br/>服用方法:<asp:TextBoxID="Usage"runat="server"Height="54px"TextMode="MultiLine"Width="185px"></asp:TextBox><br/><br/>     <asp:ButtonID="Button1"runat="server"Text="添加"OnClick="Button1_Click"/><asp:HyperLinkID="HyperLink1"runat="server"NavigateUrl="~/main.aspx">返回首頁</asp:HyperLink></td></tr></table>  </form></body></html>窗體發(fā)生代碼usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Data.SqlClient;publicpartialclassMedicineAdd:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}protectedvoidButton1_Click(objectsender,EventArgse){stringstr="DataSource=LENOVO-PC\\SQLEXPRESS;Database=hospital;IntegratedSecurity=True";stringtime=Convert.ToString(DateTime.Now.ToLongTimeString());SqlConnectionmyConnection=newSqlConnection(str);myConnection.Open();stringsqlstr="insertintomedicinevalues('"+this.MedicineName.Text+"','"+this.Count.Text+"','"+this.Price.Text+"','"+this.Unit.Text+"','"+this.ApprovalNumber.Text+"','"+this.Efficacy.Text+"','"+this.Ingredient.Text+"','"+this.Usage.Text+"''')";SqlCommandcom=newSqlCommand(sqlstr,myConnection);com.ExecuteNonQuery();Response.Write("<script>alert('恭喜您,添加藥品信息已成功!')</script>");}}修改藥品信息頁面源代碼<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="MedicineDetails.aspx.cs"Inherits="MedicineDetails"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="/1999/xhtml"><headid="Head1"runat="server"><title></title><styletype="text/css">.STYLE1{color:#FF0000}body,td,th{ font-size:9pt;}body{ margin-left:0px; margin-right:0px; margin-bottom:0px; margin-top:0px;}.style7{height:20px;font-size:large;font-weight:bold;text-align:center;color:#FFFFFF;}</style></head><bodybackground="11.jpg"><formid="Form1"method="post"runat="server"><br/><asp:ImageID="Image1"runat="server"Height="93px"ImageUrl="~/10.jpg"Width="810px"/><br/><tablewidth=600border=0cellpadding=0cellspacing=0align="center"><trbgcolor="#33b7f9"> <tdclass="style7">修改藥品信息</td></tr><trbgcolor="#f6fdfd"><tdstyle="height:42px;background-color:gray;"><br/>藥品名稱:<asp:TextBoxID="MedicineName"runat="server"ReadOnly="True"Width="81px"></asp:TextBox><br/><br/>藥品數(shù)量:<asp:TextBoxID="Count"runat="server"Width="81px"></asp:TextBox><br/><br/>藥品單價:<asp:TextBoxID="Price"runat="server"Width="81px"></asp:TextBox>元<br/><br/>藥品單位:<asp:TextBoxID="Unit"runat="server"Width="81px"ReadOnly="true"></asp:TextBox><br/><br/>批文編號:<asp:TextBoxID="ApprovalNumber"runat="server"ReadOnly="True"Width="81px"></asp:TextBox><br/><br/>藥品功效:<asp:TextBoxID="Efficacy"runat="server"Height="54px"TextMode="MultiLine"Width="185px"></asp:TextBox><br/><br/>藥品成份:<asp:TextBoxID="Ingredient"runat="server"Height="54px"TextMode="MultiLine"Width="185px"></asp:TextBox><br/><br/>服用方法:<asp:TextBoxID="Usage"runat="server"Height="54px"TextMode="MultiLine"Width="185px"ReadOnly="false"></asp:TextBox><br/><br/> <asp:ButtonID="Button1"runat="server"Text="修改"/><asp:HyperLinkID="HyperLink2"runat="server"NavigateUrl="~/main.aspx">返回首頁</asp:HyperLink></td></tr></table>   </form></body></html>查詢藥品信息頁面源代碼<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="MedicineManage.aspx.cs"Inherits="MedicineManage"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="/1999/xhtml"><headid="Head1"runat="server"><title></title><styletype="text/css">.STYLE1{color:#FF0000}body,td,th{ font-size:9pt;}body{ margin-left:0px; margin-right:0px; margin-bottom:0px; margin-top:0px;}.style7{height:22px;font-weight:bold;font-size:large;text-align:center;color:#FFFFFF;}.style8{text-align:center;}</style><scriptlanguage="javascript"type="text/javascript">//<!CDATA[functionTABLE1_onclick(){}//]]></script></head><bodybackground="back_012.gif"><formmethod="post"id="form1"runat="server"><br/><br/><br/><br/><br/><br/><br/> <tablewidth=100%border=0cellpadding=0cellspacing=0align="center"id="TABLE1"onclick="returnTABLE1_onclick()"><trbgcolor="#33b7f9"> <tdclass="style7">查詢藥品信息</td></tr><tr><tdstyle="width:100%;background-color:maroon;"valign=topclass="style8"><divclass="style8">藥品名稱:<asp:TextBoxID="MedicineName"runat="server"Width="141px"></asp:TextBox>   <asp:ButtonID="Button1"runat="server"Text="查詢"OnClick="Button1_Click"/><asp:HyperLinkID="HyperLink1"runat="server"NavigateUrl="~/main.aspx">返回首頁</asp:HyperLink><br/></div>                    </tr></table><br/><br/><br/> </form></body></html>窗體發(fā)生代碼usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Data.SqlClient;publicpartialclassMedicineManage:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){Stringsqlconn="DataSource=LENOVO-PC\\SQLEXPRESS;Database=hospital;IntegratedSecurity=True";SqlConnectionmyConnection=newSqlConnection(sqlconn);myConnection.Open();SqlCommandmyCommand=newSqlCommand("select*frommedicine",myConnection);SqlDataAdapterAdapter=newSqlDataAdapter();Adapter.SelectCommand=myCommand;DataSetmyDs=newDataSet();Adapter.Fill(myDs);Response.Write("<h3>藥品信息</h3>");Response.Write("<tableborder=1cellspacing=0cellpadding=2>");DataTablemyTable=myDs.Tables[0];Response.Write("<trbgcolor=green>");foreach(DataColumnmyColumninmyTable.Columns){Response.Write("<td>"+myColumn.ColumnName+"</td>");}Response.Write("</tr>");foreach(DataRowmyRowinmyTable.Rows){Response.Write("<tr>");foreach(DataColumnmyColumninmyTable.Columns){Response.Write("<td>"+myRow[myColumn]+"</td>");}Response.Write("</tr>");}Response.Write("</table>");myConnection.Close();}protectedvoidButton1_Click(objectsender,EventArgse){Stringsqlconn="DataSource=LENOVO-PC\\SQLEXPRESS;Database=hospital;IntegratedSecurity=True";SqlConnectionmyConnection=newSqlConnection(sqlconn);myConnection.Open();stringstr="select*frommedicinewhere藥品名稱='"+MedicineName.Text+"'";SqlCommandmyCommand=newSqlCommand(str,myConnection);SqlDataAdapterAdapter=newSqlDataAdapter();Adapter.SelectCommand=myCommand;DataSetmyDs=newDataSet();Adapter.Fill(myDs);Response.Write("<h3>查詢獲得的信息</h3>");Response.Write("<tableborder=1cellspacing=0cellpadding=2>");DataTablemyTable=myDs.Tables[0];Response.Write("<trbgcolor=green>");foreach(DataColumnmyColumninmyTable.Columns){Response.Write("<td>"+myColumn.ColumnName+"</td>");}Response.Write("</tr>");foreach(DataRowmyRowinmyTable.Rows){Response.Write("<tr>");foreach(DataColumnmyColumninmyTable.Columns){Response.Write("<td>"+myRow[myColumn]+"</td>");}Response.Write("</tr>");}Response.Write("</table>");myConnection.Close();}}住院登記頁面源代碼<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="PatientAdd.aspx.cs"Inherits="PatientAdd"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="/1999/xhtml"><headid="Head1"runat="server"><title></title><styletype="text/css">.STYLE1{color:#FF0000}body,td,th{ font-size:9pt;}body{ margin-left:0px; margin-right:0px; margin-bottom:0px; margin-top:0px;}.style7{height:24px;font-size:large;font-weight:bold;text-align:center;color:#FFFFFF;}</style></head><bodybackground="11.jpg"><formid="Form1"method="post"runat="server">  <br/><br/><asp:ImageID="Image1"runat="server"Height="80px"ImageUrl="~/10.jpg"Width="812px"/><br/><tablewidth=600border=0cellpadding=0cellspacing=0align="center"style="height:213px"><trbgcolor="#33b7f9"> <tdclass="style7">住院信息登記</td></tr><tr><tdstyle="height:56px;background-color:gray"><br/>姓名:<asp:TextBoxID="Name"runat="server"Width="81px"></asp:TextBox><asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="Name"ErrorMessage="姓名必填!"></asp:RequiredFieldValidator><br/><br/>性別: <asp:DropDownListID="Sex"runat="server"Width="81px"Height="16px"><asp:ListItem>男</asp:ListItem><asp:ListItem>女</asp:ListItem></asp:DropDownList><br/><br/>年齡:<asp:TextBoxID="Age"runat="server"Width="81px"></asp:TextBox><br/><br/>病房:<asp:TextBoxID="RoomNo"runat="server"Width="81px"></asp:TextBox><br/><br/>入院日期:<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox><br/><br/>出院日期:<asp:TextBoxID="TextBox2"runat="server"></asp:TextBox><br/><br/>住院費:<asp:TextBoxID="TextBox3"runat="server"></asp:TextBox><br/><br/><br/>操作:<asp:TextBoxID="TextBox4"runat="server"></asp:TextBox><br/><asp:ButtonID="Button1"runat="server"Text="登記"OnClick="Button1_Click"/><asp:HyperLinkID="HyperLink1"runat="server"NavigateUrl="~/main.aspx">返回首頁</asp:HyperLink><br/></td></tr></table></form></body></html>窗體發(fā)生代碼usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Data.SqlClient;publicpartialclassPatientAdd:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgse){}protectedvoidButton1_Click(objectsender,EventArgse){stringstr="DataSource=LENOVO-PC\\SQLEXPRESS;Database=hospital;IntegratedSecurity=True";stringtime=Convert.ToString(DateTime.Now.ToLongTimeString());SqlConnectionmyConnection=newSqlConnection(str);myConnection.Open();stringsqlstr="insertintoinhospitalvalues('"+this.Name.Text+"','"+this.Sex.Text+"','"+this.Age.Text+"','"+this.RoomNo.Text+"','"+this.TextBox1.Text+"','"+this.TextBox2.Text+"','"+this.TextBox3.Text+"','"+this.TextBox4.Text+"''')";SqlCommandcom=newSqlCommand(sqlstr,myConnection);com.ExecuteNonQuery();Respo

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論