public void Mobile_AskDoctor(int patientId, int doctorId, string problem, string problemDetails) { Mobile_AskDoctorBO objMobile_AskDoctorBO = new Mobile_AskDoctorBO(); objMobile_AskDoctorBO.patientId = patientId; objMobile_AskDoctorBO.doctorId = doctorId; objMobile_AskDoctorBO.problem = problem; objMobile_AskDoctorBO.problemDetails = problemDetails; Mobile_AskDoctorDL objMobile_AskDoctorDL = new Mobile_AskDoctorDL(); objMobile_AskDoctorDL.Mobile_AskDoctor(objMobile_AskDoctorBO); }
public void Mobile_AskDoctor(Mobile_AskDoctorBO objMobile_AskDoctorBO) { SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand("sp_Mobile_AskDoctor", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@patientId", objMobile_AskDoctorBO.patientId); cmd.Parameters.Add("@doctorId", objMobile_AskDoctorBO.doctorId); cmd.Parameters.Add("@problem", objMobile_AskDoctorBO.problem); cmd.Parameters.Add("@problemDetails", objMobile_AskDoctorBO.problemDetails); conn.Open(); cmd.ExecuteNonQuery(); conn.Close(); }