private void CheckAppRole(string authResult) { errorlabel.Visible = true; errorlabel.ForeColor = System.Drawing.Color.Red; if (authResult == "true") { try { string loginRole = UserProfile.UserLoginRole(txtUserName.Text);// Authentication.UserRole(txtUserName.Text); if (loginRole == "SAP Profile") { errorlabel.Text = WebConfig.getValuebyKey("NotAuthorize"); } else if (loginRole == "Other" || loginRole == "OtherDB") { errorlabel.Text = WebConfig.getValuebyKey("SorryNoP"); } else { CreateAuthenticationTicket(loginRole); } } catch (Exception ex) { errorlabel.Text = "Database Operation Failed - " + ex.Message; } } else { errorlabel.Text = authResult; txtPassword.Focus(); } }
private void SetSpSource() { // ************************Setup Data source SP and parameters source************************************************* // <add key="SPFile" value="Content\DataAccess.json"/> string spfile = WebConfig.getValuebyKey("SPFile"); if (spfile != "") { spfile = Server.MapPath(spfile); } SPSource.SPFile = spfile; }