本文整理汇总了C#中Author.Update方法的典型用法代码示例。如果您正苦于以下问题:C# Author.Update方法的具体用法?C# Author.Update怎么用?C# Author.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Author
的用法示例。
在下文中一共展示了Author.Update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Bt_Update_Click
protected void Bt_Update_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Author author = new Author();
author.LoadInfo(Request.Cookies["userID"].Value.ToString());
if (txtPwdold.Text == author.authorPwd)
{
string xwhere = "where authorID=" + SQLString.GetQuotedString(Request.Cookies["userID"].Value.ToString());
Hashtable ht = new Hashtable();
ht.Add("authorPwd", SQLString.GetQuotedString(txtPwdnew.Text));
if (author.Update(ht, xwhere))
{
Response.Write("<Script Language=JavaScript>alert(\"密码修改成功!\")</Script>");
}
else
{
Response.Write("<Script Language=JavaScript>alert(\"密码修改失败!\")</Script>");
}
}
else
{
Response.Write("<Script Language=JavaScript>alert(\"旧密码错误!\")</Script>");
}
}
}
示例2: Bt_update_Click
protected void Bt_update_Click(object sender, EventArgs e)
{
string userID = Request.Cookies["userID"].Value.ToString();
string where = " where authorID=" + SQLString.GetQuotedString(userID);
Hashtable ht = new Hashtable();
ht.Add("authorName", SQLString.GetQuotedString(txtName.Text));
ht.Add("authorSex", SQLString.GetQuotedString(rblSex.SelectedValue));
ht.Add("authorBirth", SQLString.GetQuotedString(txtBirth.Text));
ht.Add("authorRegion", SQLString.GetQuotedString(txtRegion.Text));
ht.Add("authorMail", SQLString.GetQuotedString(txtMail.Text));
ht.Add("authorPost", SQLString.GetQuotedString(TxtPostcode.Text));
ht.Add("authorDegree", SQLString.GetQuotedString(ddlDegree.SelectedValue));
ht.Add("authorMajor", SQLString.GetQuotedString(txtMajor.Text));
ht.Add("authorTitle", SQLString.GetQuotedString(txtTitle.Text));
ht.Add("authorJob", SQLString.GetQuotedString(txtJob.Text));
ht.Add("authorCompany", SQLString.GetQuotedString(txtCompany.Text));
ht.Add("authorPhone", SQLString.GetQuotedString(txtPhone.Text));
ht.Add("authorAddress", SQLString.GetQuotedString(txtAddress.Text));
ht.Add("authorInfo", SQLString.GetQuotedString(txtInfo.Text));
Author author = new Author();
if (author.Update(ht, where))
{
Response.Write("<Script Language=JavaScript>alert(\"修改成功!\")</Script>");
}
}
示例3: Bt_update_Click
protected void Bt_update_Click(object sender, EventArgs e)
{
string userID = Request.Cookies["userID"].Value.ToString();
string where = " where authorID=" + SQLString.GetQuotedString(userID);
Hashtable ht = new Hashtable();
ht.Add("authorName", SQLString.GetQuotedString(txtName.Text));
ht.Add("authorMail", SQLString.GetQuotedString(txtMail.Text));
ht.Add("authorPost", SQLString.GetQuotedString(TxtPostcode.Text));
ht.Add("authorCompany", SQLString.GetQuotedString(txtCompany.Text));
ht.Add("authorPhone", SQLString.GetQuotedString(txtPhone.Text));
ht.Add("authorAddress", SQLString.GetQuotedString(txtAddress.Text));
Author author = new Author();
if (author.Update(ht, where))
{
Response.Write("<Script Language=JavaScript>alert(\"修改成功!\")</Script>");
}
}