本文整理汇总了C#中DBFunctions.updatebookrequest方法的典型用法代码示例。如果您正苦于以下问题:C# DBFunctions.updatebookrequest方法的具体用法?C# DBFunctions.updatebookrequest怎么用?C# DBFunctions.updatebookrequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBFunctions
的用法示例。
在下文中一共展示了DBFunctions.updatebookrequest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request.QueryString["id"] != null)
{
int ID = int.Parse(Request.QueryString["id"]);
string action = Request.QueryString["action"];
DBFunctions db = new DBFunctions();
if (action == "Reject")
{
db.updatebookrequest(ID, DateTime.Now.Date, -1);
Response.Redirect("BookRequests.aspx");
return;
}
var request = db.getBookRequest(ID);
BookTitle.Text = request.Book.Title;
Issueto.Text = request.LibraryMember.Candidate_tbl.Name;
IssueDate.Text = DateTime.Now.ToShortDateString();
}
for (int i = 1; i < 32; i++)
{
dropdownDay.Items.Insert((i - 1), new ListItem(i.ToString(), i.ToString()));
}
dropdownDay.SelectedValue = DateTime.Now.Day.ToString();
dropdownMonth.SelectedValue = DateTime.Now.Month.ToString();
}
}
示例2: btnIssuebook_Click
protected void btnIssuebook_Click(object sender, EventArgs e)
{
int ID = int.Parse(Request.QueryString["id"]);
string duedate = dropdownMonth.Text + "-" + dropdownDay.Text+"-" + DateTime.Now.Year;
DateTime ddate = DateTime.Parse(duedate);
if(DateTime.Now.Date<=ddate)
{
DBFunctions db = new DBFunctions();
db.updatebookrequest(ID,ddate,1);
Response.Redirect("BookRequests.aspx");
}
else
{
datemessage.Visible = true;
}
}