예제 #1
0
    protected void Button13_Click(object sender, EventArgs e)
    {
        try
        {
            string         constring = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString.ToString();
            DataWorksClass dw        = new DataWorksClass(constring);
            string         labid     = Session["lab_id"].ToString();

            dw.SetCommand("UPDATE Labreport SET Medical_officer=@moff, Patient_ID=@pid, Issue_date=@isd, Issue_month=@ism, Issue_year=@isy, Report_type=@rtype WHERE Lab_report_ID='" + labid + "'");

            //dw.SetSqlCommandParameters("lid", labid);
            dw.SetSqlCommandParameters("moff", DropDownList13.SelectedValue);
            dw.SetSqlCommandParameters("pid", ApptP_ID);
            dw.SetSqlCommandParameters("isd", DropDownList14.SelectedValue);
            dw.SetSqlCommandParameters("ism", DropDownList15.SelectedValue);
            dw.SetSqlCommandParameters("isy", DropDownList16.SelectedValue);
            dw.SetSqlCommandParameters("rtype", "Urine");
            dw.Update();

            dw.SetCommand("UPDATE Urinereport SET Glucose=@Glucose, Protein=@Protein, Crystal=@Crystal, Acidity=@Acidity, Other=@Other WHERE  Lab_report_ID='" + labid + "'");

            dw.SetSqlCommandParameters("Glucose", TextBox16.Text.Trim());
            dw.SetSqlCommandParameters("Protein", TextBox17.Text.Trim());
            dw.SetSqlCommandParameters("Crystal", TextBox18.Text.Trim());
            dw.SetSqlCommandParameters("Acidity", TextBox20.Text.Trim());
            dw.SetSqlCommandParameters("Other", TextBox23.Text.Trim());
            dw.Update();
            Response.Redirect("~/User/Doctor/Dashboard.aspx");
        }
        catch
        {
        }
    }
예제 #2
0
    protected void Button6_Click(object sender, EventArgs e)
    {
        try
        {
            string         constring = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString.ToString();
            DataWorksClass dw        = new DataWorksClass(constring);
            string         labid     = Session["lab_id"].ToString();

            dw.SetCommand("UPDATE Labreport SET Medical_officer=@moff, Patient_ID=@pid, Issue_date=@isd, Issue_month=@ism, Issue_year=@isy, Report_type=@rtype WHERE Lab_report_ID='" + labid + "'");

            //dw.SetSqlCommandParameters("lid", labid);
            dw.SetSqlCommandParameters("moff", DropDownList1.SelectedValue);
            dw.SetSqlCommandParameters("pid", ApptP_ID);
            dw.SetSqlCommandParameters("isd", DropDownList3.SelectedValue);
            dw.SetSqlCommandParameters("ism", DropDownList4.SelectedValue);
            dw.SetSqlCommandParameters("isy", DropDownList6.SelectedValue);
            dw.SetSqlCommandParameters("rtype", "Blood");
            dw.Update();

            dw.SetCommand("UPDATE Bloodreport SET Red_blood_cells=@redbcell, White_blood_cells=@whitebcell, Glucose=@glu, Blood_type=@btype, Hemoglobin=@hemog, Platelets=@plate, Other=@other WHERE  Lab_report_ID='" + labid + "'");

            dw.SetSqlCommandParameters("redbcell", TextBox2.Text.Trim());
            dw.SetSqlCommandParameters("whitebcell", TextBox3.Text.Trim());
            dw.SetSqlCommandParameters("glu", TextBox5.Text.Trim());
            dw.SetSqlCommandParameters("btype", TextBox24.Text.Trim());
            dw.SetSqlCommandParameters("hemog", TextBox6.Text.Trim());
            dw.SetSqlCommandParameters("plate", TextBox8.Text.Trim());
            dw.SetSqlCommandParameters("other", TextBox7.Text.Trim());
            dw.Update();
            Response.Redirect("~/User/Doctor/Dashboard.aspx");
        }
        catch
        {
        }
    }
예제 #3
0
    protected void Button11_Click(object sender, EventArgs e)
    {
        try
        {
            string         constring = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString.ToString();
            DataWorksClass dw        = new DataWorksClass(constring);
            string         labid     = Session["lab_id"].ToString();

            dw.SetCommand("UPDATE Labreport SET Medical_officer=@moff, Patient_ID=@pid, Issue_date=@isd, Issue_month=@ism, Issue_year=@isy, Report_type=@rtype WHERE Lab_report_ID='" + labid + "'");

            //dw.SetSqlCommandParameters("lid", labid);
            dw.SetSqlCommandParameters("moff", DropDownList7.SelectedValue);
            dw.SetSqlCommandParameters("pid", ApptP_ID);
            dw.SetSqlCommandParameters("isd", DropDownList10.SelectedValue);
            dw.SetSqlCommandParameters("ism", DropDownList11.SelectedValue);
            dw.SetSqlCommandParameters("isy", DropDownList12.SelectedValue);
            dw.SetSqlCommandParameters("rtype", "Cholestrol");
            dw.Update();

            dw.SetCommand("UPDATE Colestoroll SET LDL=@LDL, HDL=@HDL, Triglicerides=@Triglicerides, VLDL_Cholesterol=@VLDL_Cholesterol, Total_Cholesterol=@Total_Cholesterol, Other=@Other WHERE  Lab_report_ID='" + labid + "'");

            dw.SetSqlCommandParameters("LDL", TextBox9.Text.Trim());
            dw.SetSqlCommandParameters("HDL", TextBox10.Text.Trim());
            dw.SetSqlCommandParameters("Triglicerides", TextBox11.Text.Trim());
            dw.SetSqlCommandParameters("VLDL_Cholesterol", TextBox12.Text.Trim());
            dw.SetSqlCommandParameters("Total_Cholesterol", TextBox13.Text.Trim());
            dw.SetSqlCommandParameters("Other", TextBox19.Text.Trim());
            dw.Update();
            Response.Redirect("~/User/Doctor/Dashboard.aspx");
        }
        catch
        {
        }
    }
예제 #4
0
    protected void btnPP_Click(object sender, EventArgs e)
    {
        string         constring = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString.ToString();
        DataWorksClass dw        = new DataWorksClass(constring);

        dw.SetDataAdapter(@"SELECT * FROM Admin WHERE User_ID='" + uid + "' ");
        DataTable dt = dw.GetDataTable();

        if (dw != null)
        {
            try
            {
                //dw.SetCommand(@"UPDATE Admin SET Working_hospital=@Working_hospital,Trained_area=@Trained_area,Salary=@Salary,First_name=@First_name,Last_name=@Last_name where User_ID='" + uid + "' ");

                dw.SetCommand(@"UPDATE Admin SET Working_hospital=@Working_hospital,Salary=@Salary,First_name=@First_name,Last_name=@Last_name where User_ID='" + uid + "' ");

                dw.SetSqlCommandParameters("@Working_hospital", DropDownList13.SelectedValue.Trim());
                //dw.SetSqlCommandParameters("@Trained_area", DropDownList12.SelectedValue.Trim());
                dw.SetSqlCommandParameters("@Salary", TextBox14.Text.Trim());
                dw.SetSqlCommandParameters("@First_name", TextBox1.Text.Trim());
                dw.SetSqlCommandParameters("@Last_name", TextBox2.Text.Trim());
                dw.Update();

                dw.SetCommand(@"UPDATE namal SET Title=@Title,Gender=@Gender,DOBy=@DOBy,DOBd=@DOBd,DOBm=@DOBm,NIC=@NIC,PassportN=@PassportN where User_ID='" + uid + "' ");
                dw.SetSqlCommandParameters("@Title", DropDownList1.SelectedIndex);
                dw.SetSqlCommandParameters("@Gender", DropDownList11.SelectedValue.Trim());
                dw.SetSqlCommandParameters("@DOBy", DropDownList5.SelectedValue.Trim());
                dw.SetSqlCommandParameters("@DOBd", DropDownList3.SelectedValue.Trim());
                dw.SetSqlCommandParameters("@DOBm", DropDownList4.SelectedValue.Trim());
                dw.SetSqlCommandParameters("@NIC", TextBox3.Text.Trim());
                dw.SetSqlCommandParameters("@PassportN", TextBox4.Text.Trim());
                dw.Update();


                Response.Write("<script language=javascript>alert('Update Success!')</script>");
            }
            catch (Exception)
            {
                Response.Write("<script language=javascript>alert('Updation Failed!')</script>");
            }
        }
        else
        {
            Response.Write("<script language=javascript>alert('No Records Found!')</script>");
        }
    }
예제 #5
0
    protected void Button2_Click1(object sender, EventArgs e)
    {
        string         constring = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString.ToString();
        DataWorksClass dw        = new DataWorksClass(constring);

        dw.SetCommand(@"UPDATE namal SET Mobile_number=@Mobile_number,Home_telephone_number=@Home_telephone_number,office_number=@office_number,Address=@Address,Country=@Country,Province=@Province,ZIPcode=@ZIPcode,EmName=@EmName,EmConMob=@EmConMob where User_ID='" + uid + "' ");
        dw.SetSqlCommandParameters("@Mobile_number", TextBox7.Text.Trim());
        dw.SetSqlCommandParameters("@Home_telephone_number", TextBox8.Text.Trim());
        dw.SetSqlCommandParameters("@office_number", TextBox9.Text.Trim());
        dw.SetSqlCommandParameters("@Address", TextBox10.Text.Trim());
        dw.SetSqlCommandParameters("@Country", DropDownList7.SelectedIndex);
        dw.SetSqlCommandParameters("@Province", DropDownList6.SelectedIndex);
        dw.SetSqlCommandParameters("@ZIPcode", TextBox11.Text.Trim());
        dw.SetSqlCommandParameters("@EmName", TextBox12.Text.Trim());
        dw.SetSqlCommandParameters("@EmConMob", TextBox13.Text.Trim());
        dw.Update();
    }
예제 #6
0
    protected void Button3_Click1(object sender, EventArgs e)
    {
        dw.SetCommand("UPDATE namal SET Mobile_number = @mob, Home_telephone_number = @home, office_number = @onu, Address = @address, Country = @country , Province = @province, ZIPcode = @zip WHERE User_ID = @uid");
        // dw.SetCommand("UPDATE namal SET Mobile_number = @mob WHERE User_ID = @uid");
        dw.SetSqlCommandParameters("uid", ApptU_ID);
        dw.SetSqlCommandParameters("mob", txtmobile.Text.Trim());
        dw.SetSqlCommandParameters("home", txthome.Text.Trim());
        dw.SetSqlCommandParameters("onu", txtoffice.Text.Trim());
        dw.SetSqlCommandParameters("address", txtaddress.Text.Trim());
        dw.SetSqlCommandParameters("country", ddlcountry.SelectedIndex.ToString().Trim());
        dw.SetSqlCommandParameters("province", ddlprovince.SelectedIndex.ToString().Trim());
        dw.SetSqlCommandParameters("zip", txtzip.Text.Trim());
        dw.Update();

        dw.SetCommand("UPDATE Family SET Contact_number = @con, Name = @name WHERE Patient_ID = @pid");
        dw.SetSqlCommandParameters("con", txtemergencycontact.Text.Trim());
        dw.SetSqlCommandParameters("name", txtemergencyname.Text.Trim());
        dw.SetSqlCommandParameters("pid", ApptP_ID);
        dw.Update();
    }
예제 #7
0
    protected void Button3_Click2(object sender, EventArgs e)
    {
        try
        {
            string         constring = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString.ToString();
            DataWorksClass dw        = new DataWorksClass(constring);
            dw.SetDataAdapter(@"select * from namal where User_ID='" + uid + "' ");
            DataTable dt = dw.GetDataTable();

            cPass = (dt.Rows[0][2].ToString()).Trim(); //current pass
            string newPass     = TextBox17.Text.Trim();
            string newPassConf = TextBox18.Text.Trim();

            if (TextBox16.Text.Trim() == cPass)
            {
                if (newPass == newPassConf)
                {
                    dw.SetCommand(@"UPDATE namal SET Password=@Password where User_ID='" + uid + "' ");
                    dw.SetSqlCommandParameters("@Password", TextBox17.Text.Trim());
                    dw.Update();

                    Label32.Text = "";
                    Label33.Text = "";

                    //Email Start......................................................

                    dw.SetCommand("SELECT E_mail FROM namal WHERE User_ID = @uid");
                    dw.SetSqlCommandParameters("uid", uid);
                    string email = dw.GetSingleData().Trim();
                    string npass = TextBox17.Text.Trim();

                    dw.SetCommand("SELECT First_name FROM Doctor WHERE User_ID = @uid");
                    dw.SetSqlCommandParameters("uid", uid);
                    string fname = dw.GetSingleData().Trim();


                    MailMessage mm = new MailMessage("*****@*****.**", email);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  //(your gmail,receiver gmail)
                    mm.Subject = "KDU CMS | Password Reset!";                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           //Subject
                    mm.Body    = "<b>" + "Dear " + fname + "," + "</b> <br>" + "Your password has been changed on KDU Online Channelling and Management System." + "<br> <br>" + "<table>" + "<tr>" + "<td>" + "Your changed Password " + "</td>" + "<td>" + "<b>" + npass + "</b>" + "</td>" + "</tr>" + "</table>" + "<br> <br>" + "<i>" + "Important! Keep your password in a secure place. After remembering your password, permanantly delete this email for your account's safty." + "</i>" + "<br> <br>" + "<table>" + "<tr>" + "<td>" + "<img src=\"https://preview.ibb.co/kaGrEf/logo.png\" width=\"50px\">" + "&nbsp; &nbsp;" + "</td>" + "<td>" + "<b>" + "KDU Channeling Center," + "<br>" + "General Sir John Kotelawala Defence University," + "<br>" + "Southern Campus," + "<br>" + "Sooriyawewa." + "<br>" + "+94718810575" + "</b>" + "</td>" + "</tr>" + "</table>"; //Message

                    //+"<table>"+
                    //    "<tr>"+
                    //        "<td>" + "Your Channel Number " + "</td>" +
                    //        "<td>" + "<b>" + channelno + "</b>" + "</td>" +
                    //    "</tr>"+
                    //    "<tr>" +
                    //        "<td>" + "Your Reserved Date " + "</td>" +
                    //        "<td>" + "<b>" + TextBox3.Text.Trim() + "</b>" + "</td>" +
                    //    "</tr>" +
                    //    "<tr>" +
                    //        "<td>" + "Doctor " + "</td>" +
                    //        "<td>" + "<b>" + TextBox2.Text.Trim() + "</b>" + "</td>" +
                    //    "</tr>" +
                    //    "<tr>" +
                    //        "<td>" + "Specialization " +"</td>" +
                    //        "<td>" + "<b>" + TextBox4.Text.Trim() + "</b>" + "</td>" +
                    //    "</tr>" +
                    //"</table>"+

                    //+"<table>" +
                    //    "<tr>" +
                    //        "<td>" + "<img src=\"https://preview.ibb.co/kaGrEf/logo.png\" width=\"50px\">" + "&nbsp; &nbsp;" + "</td>" +
                    //        "<td>" + "<b>" + "KDU Channeling Center,"+"<br>"+"General Sir John Kotelawala Defence University,"+"<br>"+"Southern Campus,"+"<br>"+"Sooriyawewa."+"<br>"+"+94718810575"+"</b>" + "</td>" +
                    //    "</tr>" +
                    //"</table>" +

                    mm.IsBodyHtml = true;
                    SmtpClient smtp = new SmtpClient();
                    smtp.Host      = "smtp.gmail.com";
                    smtp.EnableSsl = true;
                    NetworkCredential networkcred = new NetworkCredential("*****@*****.**", "KDU123cms");//(your gmail & gmail password)
                    smtp.UseDefaultCredentials = true;
                    smtp.Credentials           = networkcred;
                    smtp.Port = 587;
                    smtp.Send(mm);

                    //Response.Write("<script language=javascript>alert('BOOKING SUCCESSFULL! CHECK YOUR EMAILS!')</script>");
                    Response.Redirect("~/User/Doctor/Account.aspx");

                    //---------------------------------End Email
                }
                else
                {
                    Label33.Text = "";
                    Label32.Text = "Password does not match!";
                }
            }
            else
            {
                Label33.Text = "Incorrect Password!";
                Label32.Text = "";
            }
        }
        catch { }
    }
예제 #8
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string pid = Session["Patient_ID"].ToString();

        DateTime d    = DateTime.Now;
        string   date = d.ToString("yyyy-MM-dd");


        //string date = GridView1.SelectedRow.Cells[1].Text;
        dw.SetCommand("SELECT No_of_patient FROM Appointment_date WHERE Date = @date and Doctor_ID = @did");
        dw.SetSqlCommandParameters("date", date);
        dw.SetSqlCommandParameters("did", session1);
        int count1 = Convert.ToInt32(dw.GetSingleData()) - 1;

        dw.SetCommand("SELECT appointmentdate_ID from Appointment_date WHERE  Date = @date and Doctor_ID = @did");
        dw.SetSqlCommandParameters("date", date);
        dw.SetSqlCommandParameters("did", session1);
        string appointmentdateid = dw.GetSingleData().Trim();

        dw.SetCommand("SELECT COUNT(Channel_no) FROM Channel WHERE Doctor_ID = @did and Patient_ID = @pid and chan_date = @date");
        dw.SetSqlCommandParameters("did", session1);
        dw.SetSqlCommandParameters("pid", Session["Patient_ID"].ToString().Trim());
        dw.SetSqlCommandParameters("date", date);
        int i = Convert.ToInt32(dw.GetSingleData());

        if (i < 1)
        {
            dw.SetCommand("UPDATE Appointment_date SET No_of_patient = @count WHERE  Date = @dte and Doctor_ID = @did");
            dw.SetSqlCommandParameters("dte", date);
            dw.SetSqlCommandParameters("did", session1);
            dw.SetSqlCommandParameters("count", count1);
            dw.Update();

            dw.SetCommand("SELECT MAX(Channel_no) from Channel");
            int channelno = Convert.ToInt32(dw.GetSingleData()) + 1;

            dw.SetCommand("INSERT INTO Channel (Channel_no,Doctor_ID,appointmentdate_ID,Patient_ID,chan_date) VALUES (@chlno,@docid,@appno,@patid,@date)");
            dw.SetSqlCommandParameters("chlno", channelno);
            dw.SetSqlCommandParameters("docid", Label6.Text.Trim());
            dw.SetSqlCommandParameters("appno", appointmentdateid);
            dw.SetSqlCommandParameters("patid", pid);
            dw.SetSqlCommandParameters("date", date);
            dw.Insert();

            dw.SetCommand("SELECT No_of_patient FROM Appointment_date WHERE  Date = @dte and Doctor_ID = @did");

            if (count1 == 0)
            {
                dw.SetCommand("UPDATE Appointment_date SET Availability = @ava WHERE Date = @dte and Doctor_ID = @did");
                dw.SetSqlCommandParameters("dte", date);
                dw.SetSqlCommandParameters("did", session1);
                dw.SetSqlCommandParameters("ava", "NOT AVAILABLE");
                dw.Update();
            }
            else
            {
                dw.SetCommand("UPDATE Appointment_date SET Availability = @ava WHERE Date = @dte and Doctor_ID = @did");
                dw.SetSqlCommandParameters("dte", date);
                dw.SetSqlCommandParameters("did", session1);
                dw.SetSqlCommandParameters("ava", "AVAILABLE");
                dw.Update();
            }

            //Email Start......................................................

            string uid   = Session["User_ID"].ToString();
            string uname = Session["User_name"].ToString();

            dw.SetCommand(@"SELECT User_name FROM namal WHERE User_ID = @uid");
            dw.SetSqlCommandParameters("uid", uid);


            string check = dw.GetSingleData();
            if (check == uname)
            {
                dw.SetDataAdapter(@"SELECT E_mail, User_name FROM namal WHERE User_ID = '" + uid + "' ");
                DataTable dt       = dw.GetDataTable();
                string    email    = (dt.Rows[0][0].ToString()).Trim();
                string    username = (dt.Rows[0][1].ToString()).Trim();

                //dw.SetCommand("SELECT Channel_no FROM Channel WHERE ");
                //dw.SetSqlCommandParameters("uname", txtuname.Text.Trim());
                //dw.SetSqlCommandParameters("email", txtemail.Text.Trim());
                //dw.SetSqlCommandParameters("nic", txtnic.Text.Trim());
                //string pass = dw.GetSingleData().Trim();

                MailMessage mm = new MailMessage("*****@*****.**", email);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     //(your gmail,receiver gmail)
                mm.Subject = "KDU CMS | Appintment Has Been Approved!";                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                //Subject
                mm.Body    = "<b>" + "Dear " + TextBox5.Text.Trim() + "," + "</b> <br>" + "Your appointment has been approved by KDU Online Channelling and Management System." + "<br> <br>" + "<table>" + "<tr>" + "<td>" + "Your Channel Number " + "</td>" + "<td>" + "<b>" + channelno + "</b>" + "</td>" + "</tr>" + "<tr>" + "<td>" + "Your Reserved Date " + "</td>" + "<td>" + "<b>" + TextBox3.Text.Trim() + "</b>" + "</td>" + "</tr>" + "<tr>" + "<td>" + "Doctor " + "</td>" + "<td>" + "<b>" + TextBox2.Text.Trim() + "</b>" + "</td>" + "</tr>" + "<tr>" + "<td>" + "Specialization " + "</td>" + "<td>" + "<b>" + TextBox4.Text.Trim() + "</b>" + "</td>" + "</tr>" + "</table>" + "<br> <br>" + "<table>" + "<tr>" + "<td>" + "<img src=\"https://preview.ibb.co/kaGrEf/logo.png\" width=\"50px\">" + "&nbsp; &nbsp;" + "</td>" + "<td>" + "<b>" + "KDU Channeling Center," + "<br>" + "General Sir John Kotelawala Defence University," + "<br>" + "Southern Campus," + "<br>" + "Sooriyawewa." + "<br>" + "+94718810575" + "</b>" + "</td>" + "</tr>" + "</table>"; //Message

                //+"<table>"+
                //    "<tr>"+
                //        "<td>" + "Your Channel Number " + "</td>" +
                //        "<td>" + "<b>" + channelno + "</b>" + "</td>" +
                //    "</tr>"+
                //    "<tr>" +
                //        "<td>" + "Your Reserved Date " + "</td>" +
                //        "<td>" + "<b>" + TextBox3.Text.Trim() + "</b>" + "</td>" +
                //    "</tr>" +
                //    "<tr>" +
                //        "<td>" + "Doctor " + "</td>" +
                //        "<td>" + "<b>" + TextBox2.Text.Trim() + "</b>" + "</td>" +
                //    "</tr>" +
                //    "<tr>" +
                //        "<td>" + "Specialization " +"</td>" +
                //        "<td>" + "<b>" + TextBox4.Text.Trim() + "</b>" + "</td>" +
                //    "</tr>" +
                //"</table>"+

                //+"<table>" +
                //    "<tr>" +
                //        "<td>" + "<img src=\"https://preview.ibb.co/kaGrEf/logo.png\" width=\"50px\">" + "&nbsp; &nbsp;" + "</td>" +
                //        "<td>" + "<b>" + "KDU Channeling Center,"+"<br>"+"General Sir John Kotelawala Defence University,"+"<br>"+"Southern Campus,"+"<br>"+"Sooriyawewa."+"<br>"+"+94718810575"+"</b>" + "</td>" +
                //    "</tr>" +
                //"</table>" +

                mm.IsBodyHtml = true;
                SmtpClient smtp = new SmtpClient();
                smtp.Host      = "smtp.gmail.com";
                smtp.EnableSsl = true;
                NetworkCredential networkcred = new NetworkCredential("*****@*****.**", "KDU123cms");//(your gmail & gmail password)
                smtp.UseDefaultCredentials = true;
                smtp.Credentials           = networkcred;
                smtp.Port = 587;
                smtp.Send(mm);

                //Response.Write("<script language=javascript>alert('BOOKING SUCCESSFULL! CHECK YOUR EMAILS!')</script>");
            }


            else
            {
                Response.Write("<script language=javascript>alert('YOUR DETAILS ARE NOT MATCH WITH YOUR ACCOUNT DETAILS !!!!')</script>");
            }
        }
        else
        {
            Response.Write("<script language=javascript>alert('You have an appointment already for this date !!!!')</script>");
        }


        //---------------------------------End Email



        Response.Write("<script language=javascript>alert('BOOKING SUCCESSFULL! CHECK YOUR EMAILS!')</script>");
        Response.Redirect("~/User/Patient/Appointments.aspx");
        Response.Write("<script language=javascript>alert('You have an appointment already for this date !!!!')</script>");
    }