protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         dieseaseGridView.DataSource = aDiseaseManager.GetAllDisease();
         dieseaseGridView.DataBind();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         diseaseDropDownList.DataSource     = aDiseaseManager.GetAllDisease();
         diseaseDropDownList.DataValueField = "DiseaseId";
         diseaseDropDownList.DataTextField  = "DiseaseName";
         diseaseDropDownList.DataBind();
     }
 }
        protected void docterDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable     dt    = aDiseaseManager.GetAllDisease();
            List <string> aList = new List <string>();

            aList.Add("Select A Disease");
            foreach (DataRow dr in dt.Rows)
            {
                aList.Add(dr["Name"].ToString());
            }
            diseaseDropDownList.DataSource = aList;
            diseaseDropDownList.DataBind();
        }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable     dt    = aDiseaseManager.GetAllDisease();
         List <string> aList = new List <string>();
         aList.Add("Select A Disease");
         foreach (DataRow dr in dt.Rows)
         {
             aList.Add(dr["Name"].ToString());
         }
         selectDropDownList.DataSource = aList;
         selectDropDownList.DataBind();
     }
 }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int centerId = Convert.ToInt32(Session["CenterId"]);

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

            diseaseDropDownList.DataSource     = aDiseaseManager.GetAllDisease();
            diseaseDropDownList.DataValueField = "DiseaseName";
            diseaseDropDownList.DataTextField  = "DiseaseName";
            diseaseDropDownList.DataBind();

            MedicineDropDownList.DataSource     = aMedicineManager.GetMedicineByCenter(centerId);
            MedicineDropDownList.DataValueField = "MedicineName";
            MedicineDropDownList.DataTextField  = "MedicineProperty";
            MedicineDropDownList.DataBind();
        }
Exemplo n.º 6
0
        protected void Show_Click(object sender, EventArgs e)
        {
            string     districtName = districtDropDownList.Text;
            int        districtId   = aDistrictThanaManager.GetDistrictId(districtName);
            List <int> thanalList   = aDistrictThanaManager.GetThanaIDList(districtId);
            List <int> centerList   = new List <int>();

            foreach (int i in thanalList)
            {
                List <int> aList = aCenterManager.GetCenterListByThanaID(i);
                foreach (int i1 in aList)
                {
                    centerList.Add(i1);
                }
            }

            DataTable dt = new DataTable();

            dt.Columns.Add("Data", Type.GetType("System.String"));
            dt.Columns.Add("Value1", Type.GetType("System.Int32"));

            DataTable didt = aDiseaseManager.GetAllDisease();

            foreach (DataRow dr in didt.Rows)
            {
                int diseaseId = Convert.ToInt32(dr["Serial No"].ToString());
                int total     = 0;
                foreach (int i in centerList)
                {
                    total += aTreatementManager.GetTotalByCenterDisease(i, diseaseId, startTextBox.Text, endTextBox.Text);
                }
                DataRow dr1 = dt.NewRow();
                dr1["Data"]   = dr["Name"];
                dr1["Value1"] = total;

                dt.Rows.Add(dr1);
            }
            LoadChartData(dt);
        }