Ejemplo n.º 1
0
        private void ReadSYSGRANTSFunctionInfoRromRole(object userID)
        {
            ORGStaffRoleHelper oRGStaffRoleHelper = new ORGStaffRoleHelper();
            ORGRoleHelper      oRGRoleHelper      = new ORGRoleHelper();

            foreach (string roleID in oRGStaffRoleHelper.GetRoleIDs(userID.ToString()))
            {
                this.ReadFunctionInfo(roleID);
            }
        }
Ejemplo n.º 2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.lvRoles.SelectedIndices.Count > 0)
     {
         ORGStaffRoleHelper oRGStaffRoleHelper = new ORGStaffRoleHelper();
         for (int i = 0; i < this.lvRoles.SelectedIndices.Count; i++)
         {
             ORGRole tag = this.lvRoles.SelectedItems[i].Tag as ORGRole;
             this._roles.Add(tag);
             oRGStaffRoleHelper.Add(tag.RoleID, this._staffID.ToString());
         }
     }
 }
Ejemplo n.º 3
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            ORGStaffRoleHelper oRGStaffRoleHelper = new ORGStaffRoleHelper();

            for (int i = 0; i < this.lvStaffRole.SelectedIndices.Count; i++)
            {
                ListViewItem item = this.lvStaffRole.SelectedItems[i];
                Staff        tag  = item.Tag as Staff;
                tag.RealName = item.Text;
                tag.StaffID  = item.SubItems[1].Text;
                this._staffs.Add(tag);
                oRGStaffRoleHelper.Add(this._RoleID, tag.StaffID);
            }
        }
Ejemplo n.º 4
0
        private void btnDeleteRole_Click(object sender, EventArgs e)
        {
            ORGStaffRoleHelper oRGStaffRoleHelper = new ORGStaffRoleHelper();

            for (int i = this.lvRoles.SelectedItems.Count - 1; i >= 0; i--)
            {
                ListViewItem item = this.lvRoles.SelectedItems[i];
                oRGStaffRoleHelper.DeleteByRoleID((item.Tag as ORGRole).RoleID);
                this.lvRoles.Items.Remove(item);
            }
            this.lvLayers.Items.Clear();
            this.lvFunctions.Items.Clear();
            if (this.lvStaff.SelectedIndices.Count > 0)
            {
                this.ReadSYSGRANTSLayerInfo((this.lvStaff.SelectedItems[0].Tag as Staff).StaffID);
                this.ReadSYSGRANTSLayerInfoRromRole((this.lvStaff.SelectedItems[0].Tag as Staff).StaffID);
                this.ReadSYSGRANTSFunctionInfo((this.lvStaff.SelectedItems[0].Tag as Staff).StaffID);
                this.ReadSYSGRANTSFunctionInfoRromRole((this.lvStaff.SelectedItems[0].Tag as Staff).StaffID);
            }
        }
Ejemplo n.º 5
0
        private void ReadStaffRoleInfo(object userID)
        {
            string[]           roleName           = new string[2];
            ORGStaffRoleHelper oRGStaffRoleHelper = new ORGStaffRoleHelper();
            ORGRoleHelper      oRGRoleHelper      = new ORGRoleHelper();

            foreach (string roleID in oRGStaffRoleHelper.GetRoleIDs(userID.ToString()))
            {
                ORGRole role = oRGRoleHelper.GetRole(roleID);
                if (role != null)
                {
                    roleName[0] = role.RoleName;
                    roleName[1] = role.DESCRIPT;
                    ListViewItem listViewItem = new ListViewItem(roleName)
                    {
                        Tag = role
                    };
                    this.lvRoles.Items.Add(listViewItem);
                }
            }
        }