本文整理汇总了C#中Editor.Update方法的典型用法代码示例。如果您正苦于以下问题:C# Editor.Update方法的具体用法?C# Editor.Update怎么用?C# Editor.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Editor
的用法示例。
在下文中一共展示了Editor.Update方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Bt_Update_Click
protected void Bt_Update_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Editor editor = new Editor();
editor.LoadInfo(Request.Cookies["userID"].Value.ToString());
if (txtPwdold.Text == editor.editorPwd)
{
string xwhere = "where editorID=" + SQLString.GetQuotedString(Request.Cookies["userID"].Value.ToString());
Hashtable ht = new Hashtable();
ht.Add("editorPwd", SQLString.GetQuotedString(txtPwdnew.Text));
if (editor.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 editorID=" + SQLString.GetQuotedString(userID);
Hashtable ht = new Hashtable();
ht.Add("editorName", SQLString.GetQuotedString(txtName.Text));
ht.Add("editorSex", SQLString.GetQuotedString(rblSex.SelectedValue));
ht.Add("editorMail", SQLString.GetQuotedString(txtMail.Text));
ht.Add("editorPhone", SQLString.GetQuotedString(txtPhone.Text));
ht.Add("editorAddress", SQLString.GetQuotedString(txtAddress.Text));
ht.Add("editorInfo", SQLString.GetQuotedString(txtInfo.Text));
Editor editor = new Editor();
if (editor.Update(ht, where))
{
Response.Write("<Script Language=JavaScript>alert(\"修改成功!\")</Script>");
}
}