本文整理汇总了C#中DataLayer.GetQuery方法的典型用法代码示例。如果您正苦于以下问题:C# DataLayer.GetQuery方法的具体用法?C# DataLayer.GetQuery怎么用?C# DataLayer.GetQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataLayer
的用法示例。
在下文中一共展示了DataLayer.GetQuery方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getComments
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;
}
示例2: getAdvice
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;
}
示例3: GetUserData
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;
}
示例4: getDoctor
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;
}
示例5: SelectTopTenAdvice
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;
}
示例6: SelectQuery
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;
}
示例7: SelectComment
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;
}
示例8: SelectAdvice
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;
}
示例9: getWorkList
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;
}
示例10: GetQueryWithFurtherUserDetails
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;
}
示例11: GetQuery
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;
}
示例12: getQuerryBySymptoms
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;
}
示例13: getQuerryByMedicine
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;
}
示例14: getQuerryByDoctor
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;
}