Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (Session["user"] != "center")
            //{
            //    Response.Redirect("../index.aspx");
            //}
            //else
            //{
            int centerId = 3;

            //int centerId = Convert.ToInt32(Session["CenterId"]);
            centerLabel.Text = aCenterManager.FindById(centerId).Name;
            if (!IsPostBack)
            {
                medicineDropDownList.DataSource = aMedicineManager.GetSelectedMedicines(centerId);
                medicineDropDownList.DataBind();

                doctorDropDownList.DataSource     = aDoctorManager.GetSelectedDoctors(centerId);
                doctorDropDownList.DataTextField  = "Name";
                doctorDropDownList.DataValueField = "Id";
                doctorDropDownList.DataBind();

                diseaseDropDownList.DataSource    = aDiseaseManager.GetAllDiseases();
                diseaseDropDownList.DataTextField = "Name";
                diseaseDropDownList.DataBind();
            }
            //}
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["user"] != "center")
     {
         Response.Redirect("../index.aspx");
     }
     else
     {
         int centerId = Convert.ToInt32(Session["CenterId"]);
         centerLabel.Text = aCenterManager.FindById(centerId).Name;
     }
 }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["user"] != "center")
     {
         Response.Redirect("../index.aspx");
     }
     else
     {
         //DAO.Center aCenter = aCenterManager.GetCenter(Convert.ToInt32(Session["CenterId"]));
         int centerId = Convert.ToInt32(Session["CenterId"]);
         centerLabel.Text = aCenterManager.FindById(centerId).Name;
         stockReportGridView.DataSource = aCenterManager.GetMedicineStockInCenters(centerId);
         stockReportGridView.DataBind();
     }
 }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user"] != "center")
            {
                Response.Redirect("../index.aspx");
            }
            else
            {
                int centerId = Convert.ToInt32(Session["CenterId"]);
                centerLabel.Text    = aCenterManager.FindById(centerId).Name;
                voterIdTextBox.Text = Request.QueryString[0];

                Patient aPatient = aPatientManager.GetInfoFromWebService(voterIdTextBox.Text);
                nameTextBox.Text    = aPatient.Name;
                addressTextBox.Text = aPatient.Address;

                patientHistoryGridView.DataSource = aPatientManager.GetPatient(Convert.ToInt64(voterIdTextBox.Text));
                patientHistoryGridView.DataBind();
            }
        }