コード例 #1
0
 // Insert an attribute.
 public void Insert(ItemAttribute itemAttribute)
 {
     if (itemAttribute != null)
     {
         dbTools.Insert(itemAttribute);
     }
 }
コード例 #2
0
    protected void submitAccount(object sender, EventArgs e)
    {
        string        _account    = UserAccount.Value;
        string        _name       = UserName.Value;
        string        _pass       = password.Value;
        string        _confirPass = comfirnPassword.Value;
        string        _birthday   = birthday.Value;
        string        _sex        = Request.Form["sexual"].ToString();
        List <String> UserInfo    = new List <string>();

        UserInfo.Add("");
        UserInfo.Add(_account);
        UserInfo.Add(_name);
        UserInfo.Add(_birthday);
        UserInfo.Add(_sex);
        UserInfo.Add(_pass);
        if (_pass != _confirPass)
        {
            Response.Write("<script>alert('请确认两次密码一致')</script>");
            return;
        }
        else
        {
            int lifluCount = DataBaseTools.Insert("User", UserInfo);
            if (lifluCount == 1)
            {
                Session["UserAccount"] = _account;
                Response.Redirect("userIndex.aspx");
            }
            if (lifluCount == -1)
            {
                Response.Write("<script>alert('用户名已存在')</script>");
            }
        }
    }
 public void Insert(ComponentType element)
 {
     if (element != null)
     {
         dbTools.Insert(element);
     }
 }
コード例 #4
0
 public void Insert(Rarity element)
 {
     dbTools.Insert(element);
 }
 public void Insert(ComponentRank element)
 {
     dbTools.Insert(element);
 }