Esempio n. 1
0
    private void DisplayRoleData()
    {
        if (c.qsAct == ConfigFormAction.edit)
        {
            EmployeeRoleForBackend role = empAuth.GetEmployeeRoleData(c.qsRoleId);

            if (role != null)
            {
                txtSortNo.Text            = role.SortNo.ToString();
                txtRoleName.Text          = role.RoleName;
                txtRoleName.Enabled       = false;
                txtRoleDisplayName.Text   = role.RoleDisplayName;
                CopyPrivilegeArea.Visible = false;

                //modification info
                ltrPostAccount.Text = role.PostAccount;
                ltrPostDate.Text    = string.Format("{0:yyyy-MM-dd HH:mm:ss}", role.PostDate);

                if (role.MdfDate.HasValue)
                {
                    ltrMdfAccount.Text = role.MdfAccount;
                    ltrMdfDate.Text    = string.Format("{0:yyyy-MM-dd HH:mm:ss}", role.MdfDate);
                }

                btnSave.Visible = true;
            }
        }
        else if (c.qsAct == ConfigFormAction.add)
        {
            int newSortNo = empAuth.GetEmployeeRoleMaxSortNo() + 10;
            txtSortNo.Text = newSortNo.ToString();

            btnSave.Visible = true;
        }
    }
    private void LoadRoleInfoUIData()
    {
        EmployeeRoleForBackend role = empAuth.GetEmployeeRoleData(c.qsRoleId);

        if (role != null)
        {
            ltrRoleDisplayName.Text = role.RoleDisplayName;
            ltrRoleName.Text        = role.RoleName;
            hidRoleId.Value         = c.qsRoleId.ToString();
        }
    }
Esempio n. 3
0
        public EmployeeAuthorizationsWithOwnerInfoOfDataExamined InitialAuthorizationResult(bool isTopPageOfOperation, EmployeeAuthorizations authorizations)
        {
            EmployeeAuthorizationsWithOwnerInfoOfDataExamined authAndOwner = new EmployeeAuthorizationsWithOwnerInfoOfDataExamined(authorizations);

            if (!isTopPageOfOperation)
            {
                // get owner info for config-form
                EmployeeRoleForBackend empRole = empAuth.GetEmployeeRoleData(roleId);

                if (empRole != null)
                {
                    if (empRole.RoleName == roleName)
                    {
                        authAndOwner.OwnerAccountOfDataExamined = empRole.PostAccount;
                        authAndOwner.OwnerDeptIdOfDataExamined  = empRole.PostDeptId.Value;
                    }
                }
            }

            return(authAndOwner);
        }