protected void ddlProject_SelectedIndexChanged(object sender, System.EventArgs e) { int iProjectId = int.Parse(((DropDownList)sender).SelectedValue); if (iProjectId > 0) { int iManagerId = CalendarEntry.GetProjectManager(iProjectId); ddlManager.Visible = false; lblManager.Visible = true; lblManager.Text = CommonHelper.GetUserStatus(iManagerId); txtManagerId.Value = iManagerId.ToString(); } else { if (Security.IsUserInGroup(InternalSecureGroups.PowerProjectManager)) { lblManager.Visible = false; ddlManager.Visible = true; txtManagerId.Value = "0"; } else { lblManager.Visible = true; ddlManager.Visible = false; lblManager.Text = CommonHelper.GetUserStatus((Security.CurrentUser.UserID)); txtManagerId.Value = Security.CurrentUser.UserID.ToString(); } } }