Exemplo n.º 1
0
    protected void Btn_Query_Click(object sender, EventArgs e)
    {
        string name      = this.Name.Text;
        string starttime = this.StartTime.Text;
        string endtime   = this.EndTime.Text;

        GuaHaoLogic guahaoLogic = new GuaHaoLogic();

        this.GridView1.DataSourceID = null;
        this.GridView1.DataSource   = guahaoLogic.QueryGuaHaoInfo(name, starttime, endtime);
        this.GridView1.PageIndex    = 0;
        this.GridView1.DataBind();
    }
Exemplo n.º 2
0
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        string name      = this.Name.Text;
        string starttime = this.StartTime.Text;
        string endtime   = this.EndTime.Text;

        GuaHaoLogic guahaoLogic = new GuaHaoLogic();

        this.GridView1.DataSourceID = null;
        this.GridView1.DataSource   = guahaoLogic.QueryGuaHaoInfo(name, starttime, endtime);
        this.GridView1.PageIndex    = e.NewPageIndex;
        this.GridView1.DataBind();
    }
Exemplo n.º 3
0
    protected void Btn_GuaHao_Click(object sender, EventArgs e)
    {
        GuaHaoModel guaHaoModel = new GuaHaoModel();

        guaHaoModel.setName(this.Name.Text);
        guaHaoModel.setSex(this.Sex.SelectedValue);
        guaHaoModel.setAge(Int32.Parse(this.Age.Text));
        guaHaoModel.setSubjectId(Int32.Parse(this.SubjectId.SelectedValue));
        guaHaoModel.setOperator(Session["username"].ToString());

        GuaHaoLogic guahaoLogic = new GuaHaoLogic();

        if (guahaoLogic.AddGuaHaoInfo(guaHaoModel))
        {
            Response.Write("<script>alert('挂号成功!');location.href='GuaHaoAdd.aspx';</script>");
        }
    }