Exemple #1
0
        private void BtnReject_Click(object sender, EventArgs e)
        {
            string sql = this.GridReqAppo.CurrentRow.Cells["patientname"].Value.ToString();

            MessageBox.Show("Do you Want to Delete " + sql + "?");
            string id   = this.GridReqAppo.CurrentRow.Cells["id"].Value.ToString();
            string sqll = "delete from tempReqAppoDoc where id='" + id + "';";

            DataAccess.ExecuteQuery(sqll);
            string sql1 = "select * from tempReqAppoDoc where doctorid='" + dr.Userid + "'";

            this.PopulateGridView(sql1);
            this.GridReqAppo.DataSource = this.Ds.Tables[0];

            pa.Userid   = this.GridReqAppo.CurrentRow.Cells["patientid"].Value.ToString();
            dr.Userid   = this.GridReqAppo.CurrentRow.Cells["doctorid"].Value.ToString();
            pa.Nmessage = "Your Requested Appointment is rejected from Doctor Id: " + dr.Username + "";
            prepo.AddPatientNotification(pa, dr);
        }
        private void BtnPrescription_Click(object sender, EventArgs e)
        {
            ps.Symptom        = this.txtSymptom.Text;
            ps.Diseases       = this.comDisease.Text;
            ps.Test           = this.comTest.Text;
            ps.Testclinicname = this.comClinic.Text;
            string sql = "select * from clinic where username='******'";

            Ds = DataAccess.GetDataSet(sql);
            Clinic c = new Clinic(Ds);
            string s = c.Userid;

            ps.Testclinicid = s;
            ps.Report       = this.txtReport.Text;
            ps.Medicines    = this.txtMedicines.Text;

            prepo.AddPatientHistoryInfromation(pa, dr, cl, ps);

            MessageBox.Show("Successfully Prescived!");
            this.Visible = false;

            sql = "delete from patientWatingList where patientid='" + pa.Userid + "';";
            DataAccess.ExecuteQuery(sql);

            //////
            string sqll = "select * from patientWatingList where doctorid='" + dr.Userid + "'";

            ////
            if (ps.Test.Equals("none"))
            {
                pa.Nmessage = "New prescription from Doctor: " + dr.Username + ".Please check Your History.";
                prepo.AddPatientNotification(pa, dr);
            }
            else
            {
                pa.Nmessage = "New prescription from Doctor: " + dr.Username + ".and also a panding test " + ps.Test + "Please check Your History.";
                prepo.AddPatientNotification(pa, dr);
            }
        }