Example #1
0
        public Catalog(Guid catalogId)
        {
            this.catalogId = catalogId;

            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            using (DataTable dt = cs.GetCatalog(catalogId))
            {
                if (dt.Rows.Count == 0)
                {
                    throw new Exception("没有类存在!");
                }
                DataRow cataRow = dt.Rows[0];

                this.catalogName = cataRow["catalogName"].ToString();
                this.createDate  = DateTime.Parse(cataRow["CreateDate"].ToString());
                this.description = cataRow["description"].ToString();


                if (cataRow["parentID"] != null && cataRow["parentID"].ToString() != "")
                {
                    string s = cataRow["parentID"].ToString();
                    this.parentCatalogId = new Guid(s);
                }
            }
        }
Example #2
0
        public static Catalog CreateCatalog(string catalogName, Guid parentCatalogId, string descrption)
        {
            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            Guid newCataId = cs.CreateCatalog(catalogName, parentCatalogId, descrption);

            return(new Catalog(catalogName,
                               newCataId,
                               parentCatalogId,
                               descrption,
                               DateTime.Now));
        }
Example #3
0
        public static Catalog CreateCatalog(string catalogName, Guid parentCatalogId, string descrption)
        {
           
            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            Guid newCataId = cs.CreateCatalog(catalogName, parentCatalogId, descrption);

            return new Catalog(catalogName,
                   newCataId,
                   parentCatalogId,
                   descrption,
                   DateTime.Now);
        }
Example #4
0
        public Catalog(Guid catalogId)
        {
           
            this.catalogId = catalogId;

            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            using (DataTable dt = cs.GetCatalog(catalogId))
            {
                if (dt.Rows.Count == 0) throw new Exception("没有类存在!");
                DataRow cataRow = dt.Rows[0];

                this.catalogName = cataRow["catalogName"].ToString();
                this.createDate = DateTime.Parse(cataRow["CreateDate"].ToString());
                this.description = cataRow["description"].ToString();


                if (cataRow["parentID"] != null && cataRow["parentID"].ToString() != "")
                {
                    string s = cataRow["parentID"].ToString();
                    this.parentCatalogId = new Guid(s);
                }
            }
        }
Example #5
0
 public static DataTable GetCatalogByMethod(Guid userId, QJVRMS.Business.SecurityControl.OperatorMethod method)
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return cs.GetCatalogByMethod(userId, (int)method);
 }
Example #6
0
        public static bool GetCataRight(Guid userID, Guid cataID)
        {
          
            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            return cs.CheckCatalogRight(userID, cataID);

        }
Example #7
0
 public static DataTable GetCategoryPicCount()
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return cs.GetCategoryPicCount();
 }
Example #8
0
        /// <summary>
        /// 只取出1层
        /// </summary>
        /// <param name="groupId"></param>
        /// <returns></returns>
        //public static DataTable GetCatalogTableByGroupId(Guid groupId)
        //{
        //    string sql = "select * from Catalogs where parentid is null and groupid=@catalogId order by CatalogOrder ASC";
        //    SqlParameter[] Parameters = new SqlParameter[1];


        //    Parameters[0] = new SqlParameter("@catalogId", SqlDbType.UniqueIdentifier);
        //    Parameters[0].Value = groupId;

        //    DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.SqlCon_QJVRMS, CommandType.Text, sql, Parameters).Tables[0];

        //    return dt;
        //}

        public static DataTable GetAllCatalog()
        {
           
            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            return cs.GetAllCatalog();
        }
Example #9
0
 public static DataTable GetCategoryPicCount()
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return(cs.GetCategoryPicCount());
 }
Example #10
0
        public static bool ModifyCatalog(Guid catalogId, string catalogName, string catalogOrder, string descri)
        {
            
            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            return cs.ModifyCatalog(catalogId, catalogName, catalogOrder, descri);

        }
Example #11
0
 /// <summary>
 /// 根据catalogid获取该类图片所属类
 /// </summary>
 /// <param name="catalogid">图片类Id</param>
 /// <returns>DataTable</returns>
 public static DataTable GetCatalogs(Guid catalogid)
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return(cs.GetCatalog(catalogid));
 }
Example #12
0
 public static bool ModifyCatalog(Guid catalogId, string catalogName, string catalogOrder, string descri)
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return(cs.ModifyCatalog(catalogId, catalogName, catalogOrder, descri));
 }
Example #13
0
 /// <summary>
 /// 删除分类
 ///
 /// I:如果分类存在项目则不能删除
 /// II:删除分类的同时,将删除用户组所对应的功能
 /// </summary>
 /// <param name="catalogId"></param>
 /// <returns></returns>
 public static bool DeleteCatalog(Guid catalogId)
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return(cs.DeleteCatalog(catalogId));
 }
Example #14
0
 public static DataTable GetCatalogByMethod(Guid userId, QJVRMS.Business.SecurityControl.OperatorMethod method)
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return(cs.GetCatalogByMethod(userId, (int)method));
 }
Example #15
0
 public static bool GetCataRight(Guid userID, Guid cataID)
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return(cs.CheckCatalogRight(userID, cataID));
 }
Example #16
0
 public static DataTable GetCatalogTableByParentId(Guid parentId)
 {
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return(cs.GetCatalogTableByParentId(parentId));
 }
Example #17
0
 /// <summary>
 /// 删除分类
 /// 
 /// I:如果分类存在项目则不能删除
 /// II:删除分类的同时,将删除用户组所对应的功能
 /// </summary>
 /// <param name="catalogId"></param>
 /// <returns></returns>
 public static bool DeleteCatalog(Guid catalogId)
 {
    
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return cs.DeleteCatalog(catalogId);
 }
Example #18
0
        public static DataTable GetCatalogTableByParentId(Guid parentId)
        {
           

            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            return cs.GetCatalogTableByParentId(parentId);
        }
Example #19
0
 /// <summary>
 /// 根据catalogid获取该类图片所属类
 /// </summary>
 /// <param name="catalogid">图片类Id</param>
 /// <returns>DataTable</returns>
 public static DataTable GetCatalogs(Guid catalogid)
 {
    
     QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
     return cs.GetCatalog(catalogid);
 }
Example #20
0
        /// <summary>
        /// 只取出1层
        /// </summary>
        /// <param name="groupId"></param>
        /// <returns></returns>
        //public static DataTable GetCatalogTableByGroupId(Guid groupId)
        //{
        //    string sql = "select * from Catalogs where parentid is null and groupid=@catalogId order by CatalogOrder ASC";
        //    SqlParameter[] Parameters = new SqlParameter[1];


        //    Parameters[0] = new SqlParameter("@catalogId", SqlDbType.UniqueIdentifier);
        //    Parameters[0].Value = groupId;

        //    DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.SqlCon_QJVRMS, CommandType.Text, sql, Parameters).Tables[0];

        //    return dt;
        //}

        public static DataTable GetAllCatalog()
        {
            QJVRMS.Business.CatalogWS.CatalogService cs = new QJVRMS.Business.CatalogWS.CatalogService();
            return(cs.GetAllCatalog());
        }