예제 #1
0
    /// <summary>
    /// Manage the group information section while updating group information.
    /// </summary>
    private void ManageGroupSection()
    {
        if (!string.IsNullOrEmpty(Id))
        {
            txtGroupName.Enabled = false;
            using (ResourceDataAccess dataAccess = new ResourceDataAccess(Utility.CreateContext()))
            {
                //Populate group info on UI
                Group groupObject = (Group)dataAccess.GetResource(new Guid(Id));

                if (groupObject == null)
                {
                    return;
                }

                groupInformation = dataAccess.GetGroup(groupObject.GroupName);

                if (!Page.IsPostBack)
                {
                    txtTitle.Text       = groupInformation.Title;
                    txtGroupName.Text   = groupInformation.GroupName;
                    txtDescription.Text = groupInformation.Description;
                    txtUri.Text         = groupInformation.Uri;
                }
            }
        }
    }