Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Authentication.HasResource(User.Identity.Name, "ProcedureData"))
            {
                Response.Redirect(@"/account/logon.aspx?ReturnUrl=%2f");
            }

            if (!IsPostBack)
            {
                _procedureRepo = RepositoryFactory.CreateProcedureRepo();
                //從QueryString取得 簽核代碼
                string signID = String.IsNullOrEmpty(Request["SignID"]) ? String.Empty : Request["SignID"].ToString();

                PageTitle.Value = "組織階層資料 > 新增";
                if (!String.IsNullOrWhiteSpace(signID))
                {
                    //將 viewModel 的值綁定到 頁面上
                    WebUtils.PageDataBind(_procedureRepo.GetProcedureData(signID), this.Page);

                    SignID.ReadOnly = true;
                    PageTitle.Value = "組織階層資料 > 編輯";
                }
            }
        }