Mail/AccountEdit.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Mail_AccountEdit : MojoCube.Api.UI.MyPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            hlBack.NavigateUrl = "Account.aspx?active=" + Request.QueryString["active"];

            MojoCube.Office.Sql.DropDownListBind(ddlType, "Sys_TypeID", "TypeName_CHS", "ID", "TableName='Mail_Account'", "ID", "asc");

            MojoCube.Office.Sql.DropDownListBind(ddlStatus, "Sys_StatusID", "StatusName_CHS", "ID", "TableName='Mail_Account'", "ID", "asc");

            if (Request.QueryString["id"] != null)
            {
                ViewState["pk_Account"] = MojoCube.Api.Text.Security.DecryptString(Request.QueryString["id"]);

                MojoCube.Office.Mail.Account account = new MojoCube.Office.Mail.Account();
                account.GetData(int.Parse(ViewState["pk_Account"].ToString()));

                if (Session["UserID"].ToString() != account.CreateUser.ToString())
                {
                    Response.Redirect("~/Commons/Info.aspx?type=1");
                }

                MojoCube.Office.Sql.ddlFindByValue(ddlType, account.TypeID.ToString());
                MojoCube.Office.Sql.ddlFindByValue(ddlStatus, account.StatusID.ToString());
                txtAccountName.Text = account.AccountName;
                txtDisplayName.Text = account.DisplayName;
                txtPopHost.Text = account.PopHost;
                txtSmtpHost.Text = account.SmtpHost;
                txtLoginName.Text = account.LoginName;
                txtPassword.Attributes.Add("value", MojoCube.Api.Text.Security.DecryptString(account.Password));
                txtNote.Text = account.Note;

                this.Title = "账号编辑:" + txtAccountName.Text.Trim();
            }
            else
            {
                this.Title = "账号编辑";
            }
        }
    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (txtAccountName.Text.Trim() == "")
        {
            AlertDiv.InnerHtml = MojoCube.Office.String.ShowAlert("danger", "请填写名称");
            return;
        }

        MojoCube.Office.Mail.Account account = new MojoCube.Office.Mail.Account();

后面还有 57 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。