public string AddPatientAppointment(int patientId, int doctorId, string appointmentDate, string appointmentTime, int problemBodyPartId, string problemDescription)
    {
        AddPatientAppointmentBO objAddPatientAppointmentBO = new AddPatientAppointmentBO();

        objAddPatientAppointmentBO.patientId = patientId;
        objAddPatientAppointmentBO.doctorId = doctorId;
        objAddPatientAppointmentBO.appointmentDate = appointmentDate;
        objAddPatientAppointmentBO.appointmentTime = appointmentTime;
        objAddPatientAppointmentBO.problemBodyPartId = problemBodyPartId;
        objAddPatientAppointmentBO.problemDescription = problemDescription;

        AddPatientAppointmentDL objAddNewPatientAppointmentDL = new AddPatientAppointmentDL();
        return objAddNewPatientAppointmentDL.AddPatientAppointment(objAddPatientAppointmentBO);
    }
    public string AddPatientAppointment(int patientId, int doctorId, string appointmentDate, string appointmentTime, int problemBodyPartId, string problemDescription)
    {
        AddPatientAppointmentBO objAddPatientAppointmentBO = new AddPatientAppointmentBO();

        objAddPatientAppointmentBO.patientId          = patientId;
        objAddPatientAppointmentBO.doctorId           = doctorId;
        objAddPatientAppointmentBO.appointmentDate    = appointmentDate;
        objAddPatientAppointmentBO.appointmentTime    = appointmentTime;
        objAddPatientAppointmentBO.problemBodyPartId  = problemBodyPartId;
        objAddPatientAppointmentBO.problemDescription = problemDescription;

        AddPatientAppointmentDL objAddNewPatientAppointmentDL = new AddPatientAppointmentDL();

        return(objAddNewPatientAppointmentDL.AddPatientAppointment(objAddPatientAppointmentBO));
    }
    public string AddPatientAppointment(AddPatientAppointmentBO objAddPatientAppointmentBO)
    {
        SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
        SqlCommand cmd = new SqlCommand("spAddPatientAppointment", conn);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("@patientId", objAddPatientAppointmentBO.patientId);
        cmd.Parameters.Add("@doctorId", objAddPatientAppointmentBO.doctorId);
        cmd.Parameters.Add("@appointmentDate", objAddPatientAppointmentBO.appointmentDate);
        cmd.Parameters.Add("@appointmentTime", objAddPatientAppointmentBO.appointmentTime);
        cmd.Parameters.Add("@problemBodyPartId", objAddPatientAppointmentBO.problemBodyPartId);
        cmd.Parameters.Add("@problemDescription", objAddPatientAppointmentBO.problemDescription);

        conn.Open();
        string appointmentToken = (cmd.ExecuteScalar()).ToString();
        conn.Close();
        return appointmentToken;
    }
    public string AddPatientAppointment(AddPatientAppointmentBO objAddPatientAppointmentBO)
    {
        SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
        SqlCommand    cmd  = new SqlCommand("spAddPatientAppointment", conn);

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("@patientId", objAddPatientAppointmentBO.patientId);
        cmd.Parameters.Add("@doctorId", objAddPatientAppointmentBO.doctorId);
        cmd.Parameters.Add("@appointmentDate", objAddPatientAppointmentBO.appointmentDate);
        cmd.Parameters.Add("@appointmentTime", objAddPatientAppointmentBO.appointmentTime);
        cmd.Parameters.Add("@problemBodyPartId", objAddPatientAppointmentBO.problemBodyPartId);
        cmd.Parameters.Add("@problemDescription", objAddPatientAppointmentBO.problemDescription);

        conn.Open();
        string appointmentToken = (cmd.ExecuteScalar()).ToString();

        conn.Close();
        return(appointmentToken);
    }