本文整理汇总了C#中DBFunctions.getquestionairlist方法的典型用法代码示例。如果您正苦于以下问题:C# DBFunctions.getquestionairlist方法的具体用法?C# DBFunctions.getquestionairlist怎么用?C# DBFunctions.getquestionairlist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBFunctions
的用法示例。
在下文中一共展示了DBFunctions.getquestionairlist方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadQuestionaire
private void loadQuestionaire()
{
DBFunctions db = new DBFunctions();
//code mfor paging
int pageStart = 1;
int pageEnd = 10;
pageEnd = pageSize * page;
pageStart = (pageEnd - pageSize) + 1;
if (Request.QueryString.ToString().Contains("page"))
{
page = Convert.ToInt32(Request.QueryString["page"].ToString());
pageEnd = pageSize * page;
pageStart = (pageEnd - pageSize) + 1;
}
List<UploadedQuestionaire> ques = db.getquestionairlist(page - 1, pageSize);
//ad = db.getattendancebyids(courseid, userid, page - 1, pageSize);
//List<HostelWarden_tbl> ds = new List<HostelWarden_tbl>();
// ds = db.getwardenlist(page-1, pageSize);
literalStart.Text = pageStart.ToString();
literalEnd.Text = pageEnd.ToString();
int tmpPageEnd = 0;
tmpPageEnd = pageEnd;
//pageEnd = db.getlectures_Count(crsid);
pageEnd = db.getquestionaire_Count();
if (pageEnd > 10)
{
literalTotal.Text = pageEnd.ToString();
int pagett = 0;
pagett = Convert.ToInt16(literalEnd.Text);
if (pagett > pageEnd)
{
literalEnd.Text = pageEnd.ToString();
}
}
else
{
if (pageEnd == 0)
{
literalStart.Text = "";
}
literalTotal.Text = pageEnd.ToString();
literalEnd.Text = pageEnd.ToString();
}
string tmpUrl = string.Empty;
tmpUrl = "DownloadReport.aspx?" + Request.QueryString.ToString();
if (tmpUrl.Contains("?page"))
{
tmpUrl = tmpUrl.Remove(tmpUrl.IndexOf("?page"));
}
StringBuilder listingString = new StringBuilder();
if (ques != null)
{
ListAllQuestionaire(ques);
}
if (pageEnd > 10)
{
StringBuilder paging = new StringBuilder();
int counterPage = 1;
int totalPages = 1;
totalPages = (pageEnd / 10) + 1;
string urlMain = string.Empty;
urlMain = Request.Url.ToString();
if (urlMain.Contains("?page"))
{
urlMain = urlMain.Remove(urlMain.IndexOf("?page"));
}
for (int i = 1; i <= totalPages; i++)
{
string newPageString = string.Empty;
if (i == 1)
{
newPageString = "<li><a aria-label=\"First\" href=\"" + urlMain + "\" ><<</a></li>";
if (page == i)
//.........这里部分代码省略.........
示例2: SubmitCommentsToStudents
public static string SubmitCommentsToStudents(int UserIDs, string Comments, int page)
{
DBFunctions db = new DBFunctions();
db.UpdateSuggestionStatus(UserIDs);
Mails_tbl temp = new Mails_tbl { RecieverID = UserIDs, Message = Comments, Subject = "SuggestionRequest", Status = 0, Date = DateTime.Now };
db.addmail(temp);
List<UploadedQuestionaire> ques = db.getquestionairlist(page-1, 10);
return ListAllQuestionaire_2(ques) + "?" + temp1;
}