Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Authentication(enumModule.Customer);


            if (string.IsNullOrEmpty(Request["id"]))
            {
                return;
            }


            if (!Page.IsPostBack)
            {
                //btnDel.Attributes.Add("onclick", "onDel('" + btnDel.UniqueID + "');return false;");
                hidID.Value = Request["id"];
                BindData();
            }
            Page.Title += txtInnerReferenceID.Text;

            //现在不用批量上传银行对账记录,所以录入订单和录入银行对账在同一界面,
            //要根据enumModule.BankStatement的权限来决定gridview里的对账记录是否可写.
            var rights = svr.GetRoleAccessRight(LoginUserRoleID, enumModule.BankStatement);

            if (rights == null || (!rights.New && !rights.Edit))
            {
                for (int i = 0; i < gvData.Rows.Count; i++)
                {
                    TextBox txt = gvData.Rows[i].FindControl("txtBankStatement") as TextBox;
                    if (txt != null)
                    {
                        txt.ReadOnly = true;
                    }
                }
            }
        }