Ejemplo n.º 1
0
 public void LoginUserPage_Init(object sender, EventArgs e)
 {
     me = (new LoginUser()).CurrentUser;
     if (!QueryReport.Code.LoginUser.isLogin())
     {
         Response.Redirect("~/SignIn.aspx", false);
         Response.End();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Get Query List for dropdown on rpexcel / rpworddetail
        /// </summary>
        /// <param name="me">Current user, used to determine privilege level</param>
        /// <param name="FormatType">1 = Excel, 2 = Word, 3 = All</param>
        public DataSet GetQueryListForDropdown(CUSTOMRP.Model.LoginUser me, int FormatType)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select [ID], [SOURCEVIEWNAME] + '  |  ' +[DESC] [NewDesc] ");
            strSql.Append(" FROM [SOURCEVIEW] ");
            strSql.AppendFormat(" WHERE [VIEWLEVEL]>={0} AND [DATABASEID]={1} AND (FORMATTYPE & {2}) = {2}", me.ViewLevel, me.DatabaseID, FormatType);
            strSql.Append(" ORDER BY [SOURCEVIEWNAME], [DESC]");
            return(DbHelperSQL.Query(me.ID, strSql.ToString()));
        }