Exemplo n.º 1
0
        public void LoadOrgUpdateData(OrganisationEntity orgEntity)
        {
            // Load organisation
            this.txt_organisationname.Text = orgEntity.OrganisationName;
            this.txt_organisationDescription.Text = orgEntity.OrganisationDescription;
            _versionNo = orgEntity.VersionNo;

            // Load roles for organisation
            List<RoleEntity> roles = _presenter.GetRolesByOrgName(orgEntity.OrganisationName);
            if (roles != null)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("Role Name");
                dt.Columns.Add("Description");
                foreach (RoleEntity assignedRole in roles)
                {
                    dt.Rows.Add(assignedRole.RoleName, assignedRole.Description);
                }
                this.ug_assignedRoles.DataSource = dt;
            }
        }
        private void ultraGridOrganisational_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                OrganisationEntity orgE = new OrganisationEntity();
                orgE.OrganisationName = ultraGridOrganisational.ActiveRow.Cells["OrganisationalUnitID"].Value.ToString();
                orgE.OrganisationDescription = ultraGridOrganisational.ActiveRow.Cells["OrganisationalUnitName"].Value.ToString();

                _presenter.ShowMaintainOrganisationNameDetail(orgE);

            }
            catch (Exception exception)
            {
                if (ExceptionManager.Handle(exception)) throw;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Exemplo n.º 3
0
        public OrganisationEntity GetOrganisationEntity()
        {
            OrganisationEntity orgEntity = new OrganisationEntity(
                this.txt_organisationname.Text,
                this.txt_organisationDescription.Text
                );

            return orgEntity;
        }