menzhen.aspx.cs
来自「医院的用户管理与缴费与当病人去医院看病的时候要挂号等作用。」· CS 代码 · 共 70 行
CS
70 行
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 ConsumptionSys_menzhen : System.Web.UI.Page
{
private string id;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request.QueryString["consumid"] == null)
{
Response.Redirect("~/error.aspx");
}
else
{
id =Request.QueryString["consumid"].ToString ();
string sql = "select * from consume where consumid ="+id;
DataTable a= GenericDataAccess.ExecuteSelectCommand(sql, Page);
if (a.Rows[0]["perhosid"].ToString() != "")
{
string hosid = a.Rows[0]["perhosid"].ToString();
string hosname = hosinfo(hosid, Page).Rows[0]["hosname"].ToString();
Label1.Text = hosname;
Label4.Text = a.Rows[0]["permoney"].ToString ();
}
else
{
string drugstoreid = a.Rows[0]["drugstoreid"].ToString();
string drugstorename = druginfo(drugstoreid, Page).Rows[0]["drugstorename"].ToString();
Label1.Text = drugstorename;
Label4.Text = "0";
}
Label5.Text = a.Rows[0]["drugname"].ToString();
Label2.Text = a.Rows[0]["permedmoney"].ToString();
Label6.Text = a.Rows[0]["drugnum"].ToString();
Label3.Text = a.Rows[0]["totalmoney"].ToString();
}
}
}
public DataTable druginfo(string drugid, Page p)
{
string sql = "select * from drugstore where drugstoreid =" + drugid;
return GenericDataAccess.ExecuteSelectCommand(sql, Page);
}
public DataTable hosinfo(string hosid, Page p)
{
string sql = "select * from hospital where hosid="+hosid;
return GenericDataAccess.ExecuteSelectCommand(sql,Page);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?