Пример #1
0
        protected void lblContactName_PreRender(object sender, EventArgs e)
        {
            Label lblContactName = (Label)sender;

            lblContactName.Text = System.Threading.Thread.CurrentPrincipal.Identity.Name;
            string CurrentUserName = lblContactName.Text;

            SYNCDataContext dc           = new SYNCDataContext();
            string          a            = dc.Connection.ConnectionString;
            string          tempRoleName = System.Web.Security.Roles.GetRolesForUser(CurrentUserName).FirstOrDefault();

            SYNC.aspnet_Roles aRole = dc.aspnet_Roles.FirstOrDefault(p => p.RoleName.Equals(tempRoleName));
            if (aRole != null)
            {
                lblContactName.ToolTip = aRole.Description;
                lblContactName.Text    = lblContactName.Text + "(" + aRole.Description + ")";
            }
        }
Пример #2
0
 partial void Deleteaspnet_Roles(aspnet_Roles instance);
Пример #3
0
 partial void Updateaspnet_Roles(aspnet_Roles instance);
Пример #4
0
 partial void Insertaspnet_Roles(aspnet_Roles instance);