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


C# User.setEmail方法代码示例

本文整理汇总了C#中User.setEmail方法的典型用法代码示例。如果您正苦于以下问题:C# User.setEmail方法的具体用法?C# User.setEmail怎么用?C# User.setEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在User的用法示例。


在下文中一共展示了User.setEmail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnUpdate_Click

    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        User user = new User();
        user.setId(Convert.ToInt32(hidUserID.Value));
        user.setUsername(txtUsername.Text);
        user.setFirstName(txtFirstName.Text);
        user.setLastName(txtLastName.Text);
        user.setAddress(txtAddress.Text);
        user.setCity(txtCity.Text);
        user.setState(txtState.Text);
        user.setZipCode(txtZipCode.Text);
        user.setEmail(txtEmail.Text);
        user.setAccountCreationDate(DateTime.Parse(txtAccountCreationDate.Text));

        UsersManager businesslayer = new UsersManager();
        Boolean userUpdated = businesslayer.updateUserDetails(user);
        //ddlAccessLevel.ClearSelection();
        Boolean accessLevelUpdated = businesslayer.updateUserAccessLevel(Convert.ToInt32(hidUserID.Value), Convert.ToInt32(ddlAccessLevel.SelectedValue));

        if (userUpdated && accessLevelUpdated)
        {
            lblMsg.Text = "User updated successfuly!";
        }
        else
        {
            lblMsg.Text = "Sorry, there was an error, please try again";
        }
    }
开发者ID:craig-smith,项目名称:CISSeniorProjectFinal,代码行数:28,代码来源:User-Management.aspx.cs

示例2: checkRegister

    public void checkRegister()
    {
        //InputField[] input;
        //input = GameObject.Find("/Login/RegisterPanel/Input").GetComponentsInChildren<InputField>();

        foreach (InputField cin in inputField)
        {
            if (cin.text == "")
            {
                Debug.Log(cin.name);
                finish = false;
                switch (cin.name)
                {
                    case "emailText":
                        hintText.text = "信箱錯誤";
                        break;
                    case "nicknameText":
                        hintText.text = "匿稱錯誤";
                        break;
                    case "nameText":
                        hintText.text = "姓名錯誤";
                        break;
                    case "accountText":
                        hintText.text = "帳號錯誤";
                        break;
                    case "password_againText":
                        hintText.text = "密碼錯誤";
                        break;
                    case "passwordText":
                        hintText.text = "密碼錯誤";
                        break;
                    default:
                        hintText.text = "Fuck";
                        break;
                }
                break;
            }
            finish = true;
        }
        if (finish)
        {
            if (connect.isConnect())
            {
                //do thing
                newAccount = new User();
                foreach (InputField cin in inputField)
                {
                    switch (cin.name)
                    {
                        case "emailText":
                            newAccount.setEmail(cin.text);
                            break;
                        case "nicknameText":
                            newAccount.setNickname(cin.text);
                            break;

                        case "nameText":
                            newAccount.setName(cin.text);
                            break;
                        case "accountText":
                            newAccount.setAccount(cin.text);
                            break;
                        case "password_againText":
                            newAccount.setPassword(cin.text);
                            break;
                    }
                }
                //Dropdown d_gender= GameObject.Find("/Login/RegisterPanel/Input/gender").GetComponent<Dropdown>();
                if (gender.value == 0) newAccount.setGender("M");
                else if (gender.value == 1) newAccount.setGender("F");
                StartCoroutine(doRegister());
            }
            else
            {
                hintText.text = "請檢查網路連線狀況";
                Debug.Log("disconnect!");
            }

        }
        else
        {
            hintText.text += "請重新檢查";
        }
    }
开发者ID:ivan-lin1993,项目名称:JiaBong,代码行数:84,代码来源:Register.cs

示例3: Submit_Click

    protected void Submit_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            int userId = Convert.ToInt32(lblUserId.Text);
            String firstName = txtFirstName.Text;
            String lastName = txtLastName.Text;
            String email = txtEmail.Text;
            String address = txtAddress.Text;
            String city = txtCity.Text;
            String state = txtState.Text;
            String zipCode = txtZipCode.Text;

            String username = Security.getUsername();

            User user = new User();
            user.setId(userId);
            user.setUsername(username);
            user.setFirstName(firstName);
            user.setLastName(lastName);
            user.setEmail(email);
            user.setAddress(address);
            user.setCity(city);
            user.setState(state);
            user.setZipCode(zipCode);

            Boolean success = businessLayer.updateUserDetails(user);

            if (success)
            {
                lblMessage.Text = "Details updated successfully.";
            }
        }
    }
开发者ID:craig-smith,项目名称:CISSeniorProjectFinal,代码行数:34,代码来源:Account-Details.aspx.cs


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