protected void Page_Load(object sender, EventArgs e) { logIn = (LogIn)Session["User"]; centercode = logIn.CenterCode; Center aCenter = centerManager.GetCenterIdbyCenterCode(centercode); centerName.Text = aCenter.Name; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { logIn = (LogIn)Session["User"]; centercode = logIn.CenterCode; Center aCenter = centerManager.GetCenterIdbyCenterCode(centercode); CenterId = aCenter.Id; centerName.Text = aCenter.Name; centerName1.Text = aCenter.Name; countDoctorLabel.Text = doctorManager.CountDoctor(CenterId).ToString(); countPatientLabel.Text = centerManager.CountPatient(CenterId).ToString(); } }
protected void Page_Load(object sender, EventArgs e) { logIn = (LogIn)Session["User"]; centercode = logIn.CenterCode; Center aCenter = centerManager.GetCenterIdbyCenterCode(centercode); centerName.Text = aCenter.Name; centerId = aCenter.Id; if (!IsPostBack) { medicineDropDownList.DataSource = medicineManager.GetAllMedicineInfobyCenterId(centerId); medicineDropDownList.DataTextField = "Name"; medicineDropDownList.DataValueField = "Id"; medicineDropDownList.DataBind(); diseaseDropDownList.DataSource = diseasesManager.GetAllDiseases(); diseaseDropDownList.DataTextField = "Name"; diseaseDropDownList.DataValueField = "Id"; diseaseDropDownList.DataBind(); doctorDropDownList.DataSource = doctorManager.GetAllDoctor(centerId); doctorDropDownList.DataTextField = "Name"; doctorDropDownList.DataValueField = "Id"; doctorDropDownList.DataBind(); ListItem medicineItem = new ListItem("Select Medicine", "-1"); medicineDropDownList.Items.Insert(0, medicineItem); ListItem diseaseItem = new ListItem("Select Disease", "-1"); diseaseDropDownList.Items.Insert(0, diseaseItem); ListItem doctorItem = new ListItem("Select Doctor", "-1"); doctorDropDownList.Items.Insert(0, doctorItem); ListItem doseItem = new ListItem("Select One", "-1"); doesDropDownList.Items.Insert(0, doseItem); } }