Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int centerId = Convert.ToInt32(Session["id"]);

            if (!IsPostBack)
            {
                doctorDropDownList.DataSource     = aDoctorManager.GetAll(centerId);
                doctorDropDownList.DataTextField  = "Name";
                doctorDropDownList.DataValueField = "Id";
                doctorDropDownList.DataBind();

                diseaseDropDownList.DataSource     = aDiseaseManager.GetAll();
                diseaseDropDownList.DataTextField  = "Name";
                diseaseDropDownList.DataValueField = "Id";
                diseaseDropDownList.DataBind();

                medicineDropDownList.DataSource     = aMedicineManager.GetAllMedicine();
                medicineDropDownList.DataTextField  = "Name";
                medicineDropDownList.DataValueField = "Id";
                medicineDropDownList.DataBind();

                doseDropDownList.DataSource     = aDoseManager.GetAll();
                doseDropDownList.DataTextField  = "Time";
                doseDropDownList.DataValueField = "Id";
                doseDropDownList.DataBind();
            }
        }
 public void GetLoadedDisease()
 {
     diseaseDropDownList.DataTextField  = "Name";
     diseaseDropDownList.DataValueField = "Id";
     diseaseDropDownList.DataSource     = diseaseManager.GetAll();
     diseaseDropDownList.DataBind();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         diseaseDropDownList.DataSource    = aDiseaseManager.GetAll();
         diseaseDropDownList.DataTextField = "Name";
         diseaseDropDownList.DataBind();
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                diseaseDropDownList.DataSource     = aDiseaseManager.GetAll();
                diseaseDropDownList.DataTextField  = "Name";
                diseaseDropDownList.DataValueField = "Id";
                diseaseDropDownList.DataBind();

                //firstDateDropDownList.DataSource = aTreatmentManager.GetAllDate();
            }
        }
Exemplo n.º 5
0
        public void GetAll_CorrectInput_ReturnAllTestDiseases()
        {
            // Arrange
            TestData testData         = new TestData();
            var      mockDataProvider = new Mock <IDataAccessManager>();

            mockDataProvider.Setup(mock => mock.GetDiseases()).Returns(testData.Diseases);
            var service = new DiseaseManager(mockDataProvider.Object);

            // Act
            List <Disease> diseases = service.GetAll().ToList();

            // Assert
            CollectionAssert.AreEqual(testData.Diseases, diseases);
        }
Exemplo n.º 6
0
 private void LoadDiseaseDropDownList()
 {
     diseaseDropDownList.DataSource    = aDiseaseManager.GetAll();
     diseaseDropDownList.DataTextField = "Name";
     diseaseDropDownList.DataBind();
 }
 public void GetLoadedGridView()
 {
     diseaseGridView.DataSource = diseaseManager.GetAll();
     diseaseGridView.DataBind();
 }