示例#1
0
        ///<summary>Returns a DefNum for the special image category specified.  Returns 0 if no match found.</summary>
        public static long GetImageCat(ImageCategorySpecial specialCat)
        {
            //No need to check RemotingRole; no call to db.
            Def def = Defs.GetDefsForCategory(DefCat.ImageCats, true).FirstOrDefault(x => x.ItemValue.Contains(specialCat.ToString()));

            return(def == null ? 0 : def.DefNum);
        }
示例#2
0
 ///<summary>Returns a DefNum for the special image category specified.  Returns 0 if no match found.</summary>
 public static long GetImageCat(ImageCategorySpecial specialCat)
 {
     Def[] defs = DefC.GetList(DefCat.ImageCats);
     for (int i = 0; i < defs.Length; i++)
     {
         if (defs[i].ItemValue.Contains(specialCat.ToString()))
         {
             return(defs[i].DefNum);
         }
     }
     return(0);
 }
示例#3
0
文件: DefC.cs 项目: nampn/ODental
 ///<summary>Returns a DefNum for the special image category specified.  Returns 0 if no match found.</summary>
 public static long GetImageCat(ImageCategorySpecial specialCat)
 {
     Def[] defs=DefC.GetList(DefCat.ImageCats);
     for(int i=0;i<defs.Length;i++) {
         if(defs[i].ItemValue.Contains(specialCat.ToString())) {
             return defs[i].DefNum;
         }
     }
     return 0;
 }