当前位置: 首页>>代码示例>>C#>>正文


C# Author.Update方法代码示例

本文整理汇总了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>");

            }
        }
    }
开发者ID:huaminglee,项目名称:OnlinePublish,代码行数:29,代码来源:modifypwd.aspx.cs

示例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>");

        }
    }
开发者ID:huaminglee,项目名称:OnlinePublish,代码行数:27,代码来源:modifyinfo.aspx.cs

示例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>");

        }
    }
开发者ID:huaminglee,项目名称:OnlinePublish,代码行数:19,代码来源:contribution2.aspx.cs


注:本文中的Author.Update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。