Ejemplo n.º 1
0
        public void loadGrid()
        {
            string PrescriptionQuery = @"SELECT [Pers_ID] ,[Doctor_Name] ,[Date] ,[Patient_Name]  ,[Age],[Blood_Pressure],[Pulse_Rate] ,[Patient_Problem]
                                          ,[Medicines]
                                          ,[Doctor_Advice]
                                          ,[Next_Date]
                                      FROM [dbo].[Prescription]";

            PrescriptionGridView1.DataSource = db.getData(PrescriptionQuery);
            PrescriptionGridView1.DataBind();

            string DoctorNameQuery = @"select Doctor_Name from Doctor where Doctor_ID in (select Doctor_ID from DoctorPatient)";


            //  string PatientNameQuery = @"SELECT [Patient_ID],[Patient_Name],[Patient_Mobile],[Patient_Address] FROM [dbo].[Patient]";
            string PatientNameQuery = @"select Patient_Name from Patient where Patient_ID IN (select Patient_ID from DoctorPatient)";

            string MedicineNameQuery = @"select medicine_Name from  Medicine where medicine_ID IN (select medicine_ID from PatientMedicine)";

            string PatientMedicineNameQuery = @"select Patient_Name from Patient where Patient_ID IN (select Patient_ID from PatientMedicine)";

            //  DoctorNameGridView.DataSource = db.getData(DoctorNameQuery);
            // DoctorNameGridView.DataBind();

            //PatientNameGridView.DataSource = db.getData(PatientNameQuery);
            //PatientNameGridView.DataBind();

            //  MedicineNameGridView.DataSource = db.getData(MedicineNameQuery);
            // MedicineNameGridView.DataBind();

            //PatientMedicineNameGridView.DataSource = db.getData(PatientMedicineNameQuery);
            // PatientMedicineNameGridView.DataBind();
        }
Ejemplo n.º 2
0
        public void loadGrid()
        {
            string PrescriptionQuery = @"SELECT [Pers_ID] ,[Doctor_Name] ,[Date] ,[Patient_Name]  ,[Age],[Blood_Pressure],[Pulse_Rate] ,[Patient_Problem]
                                          ,[Medicines]
                                          ,[Doctor_Advice]
                                          ,[Next_Date]
                                      FROM [dbo].[Prescription]";

            PrescriptionGridView1.DataSource = db.getData(PrescriptionQuery);
            PrescriptionGridView1.DataBind();
        }
Ejemplo n.º 3
0
        public void loadGrid()
        {
            string UserQuery         = @"SELECT [Patient_ID],[Patient_Name],[Patient_Mobile],[Patient_Address] FROM [dbo].[Patient]";
            string DoctorQuery       = @"SELECT [Doctor_ID],[Doctor_Name],[Doctor_Specialist],[Patient_ID] FROM [dbo].[Doctor]";
            string MediceneQuery     = @"SELECT [medicine_ID],[medicine_Name],[medicine_Price], [Patient_ID] FROM [dbo].[Medicine]";
            string PrescriptionQuery = @"SELECT [Pers_ID] ,[Doctor_Name] ,[Date] ,[Patient_Name]  ,[Age],[Blood_Pressure],[Pulse_Rate] ,[Patient_Problem]
                                          ,[Medicines]
                                          ,[Doctor_Advice]
                                          ,[Next_Date]
                                      FROM [dbo].[Prescription]";

            PrescriptionGridView1.DataSource = db.getData(PrescriptionQuery);
            PrescriptionGridView1.DataBind();

            UserGridView.DataSource = db.getData(UserQuery);
            UserGridView.DataBind();

            DoctorGridView.DataSource = db.getData(DoctorQuery);
            DoctorGridView.DataBind();

            MediceneGridView.DataSource = db.getData(MediceneQuery);
            MediceneGridView.DataBind();
        }