using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AdminDAL.Query.AdvanceRights { public static class AdvanceRightsQB { public const string GET_ADVANCE_USER_RIGHTS = @"SELECT DISTINCT advancerights.ADVANCERIGHTSID AS Id, advancerights.ALLOW AS Allow FROM MMENU menu JOIN MBIZTRANSACTIONCLASS biztransactionclass ON menu.BIZTRANSACTIONCLASSID = biztransactionclass.BIZTRANSACTIONCLASSID JOIN MBIZTRANSACTIONTYPE biztransactiontype ON biztransactionclass.BIZTRANSACTIONCLASSID = biztransactiontype.ACCOUNTBIZTRANSACTIONTYPEID JOIN MBIZTRANSACTION biztransaction ON biztransactiontype.BIZTRANSACTIONID = biztransaction.BIZTRANSACTIONID JOIN MADVANCERIGHTS advancerights ON biztransaction.BIZTRANSACTIONID = advancerights.BIZTRANSACTIONID WHERE menu.MENUTYPE = 1 AND menu.MENUNATURE = 0 AND biztransactiontype.BIZTRANSACTIONID <> -1 and advancerights.OU.Id =@ouid and advancerights.User.Id =@userid and menu.Id =@menuid and menu.BizTransactionClassId =@biztransactionclassid and biztransactiontype.Id =@biztransactiontypeid"; } }