示例#1
0
    protected override void Fire(object sender, EventArgs e)
    {
        if (!UserInfo.isDoctor(Session))
        {
            alertAndGoback("you are not a doctor. Please login");
            return;
        }

        String today = DateTime.Now.Date.ToString().Substring(0, 10);
        DOS.Text = today;
        UserID.Text = Param.getString("pId");
        Data result = new Data();
        DBC dbc = new DBC();

        Data data = new Data();
        /*dbc.open();
        data.add("pID", Param.get("pId"));
        result = dbc.select("SELECT * FROM Users WHERE UserID = @pId", data);
        dbc.close();*/
        SurgeryBiz biz = new SurgeryBiz();
        biz.view(data);
        userNameLabel.Text = Param.getString("pId");
        type.DataSource = biz.getType(data).Source;
        type.DataBind();
    }
示例#2
0
 protected override void Fire(object sender, EventArgs e)
 {
     if (!UserInfo.isDoctor(Session))
     {
         alertAndGoback("you are not a doctor. Please login");
         return;
     }
     DBC dbc = new DBC();
     Data data = new Data();
     data.add("doctorId", UserInfo.getId(Session));
     data.add("surgeryId", Param.get("surgeryId"));
     /*dbc.open();
     result = dbc.select("SELECT * FROM DoctorsSurgery A, Users B WHERE A.UserID = B.UserID AND A.SurgeryID = @surgeryId", data);
     dbc.close();*/
     SurgeryBiz biz = new SurgeryBiz();
     Data result = biz.view(data);
     type.DataSource = biz.getType(data).Source;
     type.DataBind();
     userNameLabel.Text = result.getString("UserSurName") + "," + result.getString("UserFirstName") + ",ID:" + result.getString("UserID");
     ROS.Text = result.getString("UserROS");
     DOS.Text = result.getString("UserDOS");
     surgery_description.Text = result.getString("UserSD");
     surgeryse.Text = result.getString("UserSSE");
     Memo.Text = result.getString("Memo");
     UserID.Text = result.getString("UserID");
     SurgeryID.Text = result.getString("SurgeryID");
     type.SelectedValue = result.getString("type");
     ROS.SelectedValue = result.getString("ROS");
 }