示例#1
0
 public static List <MainOptrType> GetUserTypes(long id)
 {
     if (id == 1)
     {
         return(MainOptrType.FindAll());
     }
     return(MainOptrType.Find(CK.K["Status"] == 1));
 }
示例#2
0
        //public static DataTable GetUserActions(long optrId, long moduleId)
        //{
        //    //找出该用户再这个模块的操作权限,但不包含"查看"
        //    SqlStatement ss = new SqlStatement("select * from MainAction where Id in (select [MainAction_Id] from [MainOptrAction] where [MainOptr_Id] = @OptrId and [MainModule_Id] = @ModuleId ) and Status = 0", new DataParameter("@OptrId", optrId), new DataParameter("@ModuleId", moduleId));
        //    return DbEntry.Context.ExecuteDataset(ss).Tables[0];
        //    //long

        //    //DataTable dtAction = new DataTable();


        //    //foreach (DataRow dtRows in dtAction.Rows)
        //    //{
        //    //    SqlStatement ss2 = new SqlStatement("select * from MainAction where Id = @ActionId", new DataParameter("@ActionId", dtRows["MainAction_Id"].ToString()));
        //    //    dtAction.Rows.Add(DbEntry.Context.ExecuteDataset(ss2).Tables[0].Rows[0]);
        //    //}

        //    //return dtAction;
        //}



        public static MainOptrType GetMainOptrTypeById(long id)
        {
            return(MainOptrType.FindById(id));
        }