public DataSet getComments(Comments commentObj, string connectionString) { SqlParameter pCommentId = new SqlParameter("@CommentId", SqlDbType.Int, 0); pCommentId.Value = commentObj.CommentId; SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_GetCommentInfo"; cmd.Parameters.Add(pCommentId); DataSet ds = new DataSet(); DataLayer dataLayerObj = new DataLayer(); ds = dataLayerObj.GetQuery(cmd, connectionString); return ds; }
public DataSet getAdvice(int QueryId, string connectionString) { SqlParameter paramQueryId = new SqlParameter("@QueryId", SqlDbType.Int); paramQueryId.Value = QueryId; SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_GetAdviceByQueryId"; cmd.Parameters.Add(paramQueryId); DataSet ds = new DataSet(); DataLayer dataLayerObj = new DataLayer(); ds = dataLayerObj.GetQuery(cmd, connectionString); return ds; }
private DataSet GetUserData(AuthTable user, string connString) { SqlParameter pUsername = new SqlParameter("@Username", SqlDbType.NVarChar, 50); pUsername.Value = user.Username; SqlCommand cmdSQL = new SqlCommand(); cmdSQL.CommandType = CommandType.StoredProcedure; cmdSQL.CommandText = "usp_SelectUserByUsername"; cmdSQL.Parameters.Add(pUsername); DataLayer dataLayerObj = new DataLayer(); DataSet ds = dataLayerObj.GetQuery(cmdSQL, connString); return ds; }
public DataSet getDoctor(string connectionString) { SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_getDoctor"; DataLayer dataLayerObj = new DataLayer(); DataSet dsDoctor = new DataSet(); dsDoctor = dataLayerObj.GetQuery(cmd, connectionString); return dsDoctor; }
public DataSet SelectTopTenAdvice(Query queryObj, string connString) { DataSet dsTopAdvice = new DataSet(); SqlParameter pAreaOfInterest = new SqlParameter("@QueryAreaOfInterest", SqlDbType.NVarChar, 100); pAreaOfInterest.Value = queryObj.QueryAreaOfInterest; SqlCommand cmdSQL = new SqlCommand(); cmdSQL.CommandType = CommandType.StoredProcedure; cmdSQL.CommandText = "usp_GetTopTenAdvice"; cmdSQL.Parameters.Add(pAreaOfInterest); DataLayer dataLayerObj = new DataLayer(); dsTopAdvice = dataLayerObj.GetQuery(cmdSQL, connString); return dsTopAdvice; }
public DataSet SelectQuery(Query queryObj, string connString) { DataSet dsQuery = new DataSet(); SqlParameter pQueryId = new SqlParameter("@QueryId", SqlDbType.Int, 0); pQueryId.Value = queryObj.QueryId; SqlCommand cmdSQL = new SqlCommand(); cmdSQL.CommandType = CommandType.StoredProcedure; cmdSQL.CommandText = "usp_GetQueryDetails"; cmdSQL.Parameters.Add(pQueryId); DataLayer datalayerObj = new DataLayer(); dsQuery = datalayerObj.GetQuery(cmdSQL, connString); return dsQuery; }
public DataSet SelectComment(Comments commentObj, string connString) { DataSet dsComment = new DataSet(); SqlParameter pAdviceId = new SqlParameter("@AdviceId", SqlDbType.Int, 0); pAdviceId.Value = commentObj.AdviceId; SqlCommand cmdSQL = new SqlCommand(); cmdSQL.CommandType = CommandType.StoredProcedure; cmdSQL.CommandText = "usp_GetCommentDetails"; cmdSQL.Parameters.Add(pAdviceId); DataLayer datalayerObj = new DataLayer(); dsComment = datalayerObj.GetQuery(cmdSQL, connString); return dsComment; }
public DataSet SelectAdvice(Advice adviceObj, string connString) { DataSet dsAdvice = new DataSet(); SqlParameter pAdviceId = new SqlParameter("@AdviceId", SqlDbType.Int, 0); pAdviceId.Value = adviceObj.AdviceId; SqlCommand cmdSQL = new SqlCommand(); cmdSQL.CommandType = CommandType.StoredProcedure; cmdSQL.CommandText = "usp_GetAdvice"; cmdSQL.Parameters.Add(pAdviceId); DataLayer datalayerObj = new DataLayer(); dsAdvice = datalayerObj.GetQuery(cmdSQL, connString); return dsAdvice; }
public DataSet getWorkList(bool isAttendedTo, Doctor doc, string connectionString) { SqlParameter paramIsAttendedTo = new SqlParameter("@IsAttendedTo", SqlDbType.Bit); SqlParameter paramUserName = new SqlParameter("@UserName", SqlDbType.VarChar); paramUserName.Value = doc.Username; paramIsAttendedTo.Value = isAttendedTo; SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_GetQueryByIsAttended"; cmd.Parameters.Add(paramIsAttendedTo); cmd.Parameters.Add(paramUserName); DataSet ds = new DataSet(); DataLayer dataLayerObj = new DataLayer(); ds = dataLayerObj.GetQuery(cmd, connectionString); return ds; }
public DataSet GetQueryWithFurtherUserDetails(Query queryObj, string connString) { DataSet dsQuery = new DataSet(); SqlParameter pQueryUsername = new SqlParameter("@Username", SqlDbType.NVarChar, 50); SqlParameter pQueryStatus = new SqlParameter("@Status", SqlDbType.NVarChar, 20); pQueryUsername.Value = queryObj.Username; pQueryStatus.Value = "Needs More Info"; SqlCommand cmdSQL = new SqlCommand(); cmdSQL.CommandType = CommandType.StoredProcedure; cmdSQL.CommandText = "usp_GetQueryWithFurtherUserDetail"; cmdSQL.Parameters.Add(pQueryUsername); cmdSQL.Parameters.Add(pQueryStatus); DataLayer datalayerObj = new DataLayer(); dsQuery = datalayerObj.GetQuery(cmdSQL, connString); return dsQuery; }
public DataSet GetQuery(int queryId, string connString) { SqlParameter pQueryId = new SqlParameter("@QueryId", SqlDbType.Int); pQueryId.Value = queryId; SqlCommand cmdSql = new SqlCommand(); cmdSql.CommandType = CommandType.StoredProcedure; cmdSql.CommandText = "usp_GetQueryById"; cmdSql.Parameters.Add(pQueryId); DataLayer dataLayerObj = new DataLayer(); DataSet ds = new DataSet(); ds = dataLayerObj.GetQuery(cmdSql, connString); return ds; }
public DataSet getQuerryBySymptoms(string Symptoms, string connectionString) { SqlParameter paramSymptoms = new SqlParameter("@Symptoms", SqlDbType.NVarChar); paramSymptoms.Value = Symptoms; SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_GetQueryBySymptoms"; cmd.Parameters.Add(paramSymptoms); DataLayer dataLayerObj = new DataLayer(); DataSet ds = new DataSet(); ds = dataLayerObj.GetQuery(cmd, connectionString); return ds; }
public DataSet getQuerryByMedicine(string medicine, string connectionString) { SqlParameter paramdisease = new SqlParameter("@MedicineName", SqlDbType.VarChar); paramdisease.Value = medicine; SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_SearchQueryByMedicine"; cmd.Parameters.Add(paramdisease); DataLayer dataLayerObj = new DataLayer(); DataSet ds = new DataSet(); ds = dataLayerObj.GetQuery(cmd, connectionString); return ds; }
public DataSet getQuerryByDoctor(string doctor, string connectionString) { SqlParameter paramdoc = new SqlParameter("@DocName", SqlDbType.NVarChar); paramdoc.Value = doctor; SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_GetQueryByDocId"; cmd.Parameters.Add(paramdoc); DataLayer dataLayerObj = new DataLayer(); DataSet ds = new DataSet(); ds = dataLayerObj.GetQuery(cmd, connectionString); return ds; }