departmentinfo.aspx.cs

来自「在编写管理信统软件中,您是否对于繁琐的多用户权限管理而头痛?需要对不同的用户设置」· CS 代码 · 共 52 行

CS
52
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using PermissionBase.Core.Domain;
using PermissionBase.Core.Service;

public partial class Admin_Modules_DepartmentMgr_DepartmentInfo : System.Web.UI.Page
{
    private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(Admin_Modules_DepartmentMgr_DepartmentInfo));

    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.NoCache);

        try
        {
            if (Request.QueryString["mode"] == "new")
            {
                divTitleMess.InnerText = "新增部门";
            }
            else if (Request.QueryString["mode"] == "edit")
            {
                divTitleMess.InnerText = "编辑部门";

                string id = Request.QueryString["id"];
                if (id != null)
                {
                    Department d = CommonSrv.LoadObjectById(typeof(Department), id) as Department;
                    txtName.Value = d.Name;
                    txtOrderId.Value = d.OrderId.ToString();
                    txtPhone.Value = d.Phone;
                    txtExtNumber.Value = d.ExtNumber;
                    txtFax.Value = d.Fax;
                    txtaRemark.Value = d.Remark;
                }
            }
        }
        catch (Exception ex)
        {
            ClientScript.RegisterClientScriptBlock(this.GetType(), "error", "<script type=\"text/javascript\">error=true;</script>");
            log.Error(null, ex);
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?