实例演示CodeSmith与ECC开发模式结合---快速建站(二)

 

ArticleColumn:

// BreakerLib V1.0;
using  System;

namespace  BreakerLib
{
    
/// <summary>
    
/// Address 的摘要说明。
    
/// </summary>

    public class ArticleColumn:ArticleColumnMD
    
{
        
public ArticleColumn()
        
{
            
//
            
// TODO: 在此处添加构造函数逻辑
            
//
        }

    }

}


 

ArticleColumnMD

 

// BreakerLib V1.0;
using  System;
using  System.Data;
using  System.Data.OleDb;
namespace  BreakerLib
{
    
/// <summary>
    
/// ArticleColumn Model Object,
    
/// </summary>

    public class ArticleColumnMD :BaseHelper
    
{
        
//private fields
         private Int32 m_nClass;
         
private DateTime m_dCreatedTime;
         
private String m_sDescription;
         
private Int32 m_nID;
         
private Boolean m_bIsActive;
         
private String m_sName;
         
private Int32 m_nOrder;
         
private String m_sUUID;
        
        
//public properties
        
//summary
        
//
        
//summary
        public Int32 Class
        
{
            
get{return m_nClass;}
            
set{m_nClass = value;}
        }
    
        
//summary
        
//
        
//summary
        public DateTime CreatedTime
        
{
            
get{return m_dCreatedTime;}
            
set{m_dCreatedTime = value;}
        }
    
        
//summary
        
//
        
//summary
        public String Description
        
{
            
get{return m_sDescription;}
            
set{m_sDescription = value;}
        }
    
        
//summary
        
//
        
//summary
        public Int32 ID
        
{
            
get{return m_nID;}
            
set{m_nID = value;}
        }
    
        
//summary
        
//
        
//summary
        public Boolean IsActive
        
{
            
get{return m_bIsActive;}
            
set{m_bIsActive = value;}
        }
    
        
//summary
        
//
        
//summary
        public String Name
        
{
            
get{return m_sName;}
            
set{m_sName = value;}
        }
    
        
//summary
        
//
        
//summary
        public Int32 Order
        
{
            
get{return m_nOrder;}
            
set{m_nOrder = value;}
        }
    
        
//summary
        
//
        
//summary
        public String UUID
        
{
            
get{return m_sUUID;}
            
set{m_sUUID = value;}
        }
    
    
            
//Save Data
            
//将属性值保存到 OleDbParameter 数组
            
//除去只读字段ID
            OleDbParameter
            
从 OleDbParameter Array 中获取数据填充到 Entity
            
            
从 IDataRecord 中获取数据填充到 Entity
            
            
从 IDataRecord 中获取数据填充到 Entity Collection
}

}

ArticleColumnCollection

namespace  BreakerLib
{
    
using System.Collections ;
    
using System;
    
    
public class ArticleColumnCollection:CollectionBase
    
{
        
/// <summary>
        
/// Gets or sets the value associated with the specified key
        
/// </summary>

        public ArticleColumn thisint index ]  
        
{
            
get  return( (ArticleColumn) List[index] );}
            
set  { List[index] = value;}
        }


        
/// <summary>
        
/// Adds an item to the ArticleColumn Collection
        
/// </summary>

        public int Add( ArticleColumn value )  
        
{
            
return( List.Add( value ) );
        }


        
/// <summary>
        
/// Determines the index of a specific item in the  ArticleColumn Collection
        
/// </summary>

        public int IndexOf( ArticleColumn value )  
        
{
            
return( List.IndexOf( value ) );
        }


        
/// <summary>
        
/// Inserts an item to the ArticleColumn Collection at the specified position
        
/// </summary>

        public void Insert( int index, ArticleColumn value )  
        
{
            List.Insert( index, value );
        }


        
/// <summary>
        
/// Removes the first occurrence of ArticleColumn in the ArticleColumn Collection
        
/// </summary>

        public void Remove( ArticleColumn value )  
        
{
            List.Remove( value );
        }


        
/// <summary>
        
/// Determines whether the ArticleColumn Collection contains a specific ArticleColumn
        
/// </summary>

        public bool Contains( ArticleColumn value )  
        
{
            
// If value is not of type ArticleColumn, this will return false.
            return( List.Contains( value ) );
        }


        
/// <summary>
        
/// Valiadtes before inserting a new ArticleColumn into the ArticleColumn Collection
        
/// </summary>

        protected override void OnInsert( int index, Object value )  
        
{
            
if ( value.GetType() != Type.GetType("BreakerLib.ArticleColumn,BreakerLib") )
                
throw new ArgumentException( "value must be of type ArticleColumn.""value" );
        }


        
/// <summary>
        
/// Valiadtes before removing a new ArticleColumn into the ArticleColumn Collection
        
/// </summary>

        protected override void OnRemove( int index, Object value )  
        
{
            
if ( value.GetType() != Type.GetType("BreakerLib.ArticleColumn,BreakerLib") )
                
throw new ArgumentException( "value must be of type ArticleColumn.""value" );
        }


        
/// <summary>
        
/// Valiadtes before setting a ArticleColumn in ArticleColumn Collection
        
/// </summary>

        protected override void OnSet( int index, Object oldValue, Object newValue )  
        
{
            
if ( newValue.GetType() != Type.GetType("BreakerLib.ArticleColumn,BreakerLib") )
                
throw new ArgumentException( "newValue must be of type ArticleColumn.""newValue" );
        }


        
/// <summary>
        
/// Performs additional custom processes when validating a value ArticleColumn
        
/// </summary>

        protected override void OnValidate( Object value )  
        
{
            
if ( value.GetType() != Type.GetType("BreakerLib.ArticleColumn,BreakerLib") )
                
throw new ArgumentException( "value must be of type ArticleColumn." );
        }

    }

}


ArticleColumnDAO

 

// BreakerLib V1.0;
using  System;
using  System.Data;
using  System.Data.OleDb;
namespace  BreakerLib
{
    
    
/// <summary>
    
/// ArticleColumnDAO。
    
/// </summary>

    public class ArticleColumnDAO
    
{
        
//createEntity
        
        
//Update Entity
        
        
删除实体
        
        
对上面已定义的DAO根据具体的需要再进行一次封装
        
选择全部的实体
        
        
判断实体是否存在
    
    
/// <summary>
    
/// 计算文章的总数
    
/// </summary>
    
/// <param name="Condition"></param>
    
/// <param name="nCount"></param>
    
/// <returns></returns>

    public bool CountArticleColumnWhere(string Condition ,out int nCount)
    
{
        nCount 
= 0;
        
string strSQL = string.Format("select Count (*) As nRecordCount  From [ArticleColumn] Where  {0}", Condition);
        DAOHelper data 
= new DAOHelper();
        OleDbDataReader dr 
= null;
        data.RunSQL(strSQL, 
out dr);
        
        
if (dr!=null)
        
{
            nCount 
= Convert.ToInt32(dr["nRecordCount"]);
            
return true;
        }

        
else
        
{
            
return false;
        }

    }

}
    
}
    

ArticleColumnBL

 

// Version:BreakerLib V1.0
using  System;

namespace  BreakerLib
{
    
/// <summary>
    
/// ArticleColumn 的摘要说明。
    
/// </summary>

    public class ArticleColumnBL:ArticleColumnDAO
    
{
        
public ArticleColumnBL()
        
{
            
//
            
// TODO: 在此处添加构造函数逻辑
            
//
        }

        
        
/// <summary>
        
/// 需要更新的实体
        
/// </summary>
        
/// <param name="articlecolumn"></param>
        
/// <returns>成功与否</returns>

        public static bool  UpdateArticleColumn(ArticleColumn articlecolumn)
        
{
            ArticleColumnBL oBL 
= new ArticleColumnBL();
            
return oBL.UpdataArticleColumn(articlecolumn);
        }

        
/// <summary>
        
/// 删除实体
        
/// </summary>
        
/// <param name="nID">实体的ID</param>
        
/// <returns>成功与否</returns>

        public static bool  DeleteArticleColumnWhere(int nID)
        
{
            ArticleColumnBL oBL 
= new ArticleColumnBL();
            
return oBL.DeleteArticleColumn(nID);
        }

        
/// <summary>
        
/// 查询实体
        
/// </summary>
        
/// <param name="ID">实体的ID</param>
        
/// <returns>返回Entity</returns>

        public static ArticleColumn SelectArticleColumnWhere(string ID)
        
{
            ArticleColumn articlecolumn;
            ArticleColumnBL oBL 
= new ArticleColumnBL();
            
if (oBL.SelectArticleColumnByPK( ID.ToString(), out articlecolumn))
            
{
                
return articlecolumn;
            }

            
else
            
{
                
throw new Exception();
            }

        }

        
        
/// <summary>
        
/// 查出全部Entity集合
        
/// </summary>
        
/// <returns>EntityCollection</returns>

        public static ArticleColumnCollection SelectArticleColumnCollectionWhere(BreakerSimplyHelper.EntityState state)
        
{
            
            ArticleColumnCollection ArticleColumnCollection;
            ArticleColumnBL oBL 
= new ArticleColumnBL();
            
string condition = "";
            
switch (state)
            
{
                
case BreakerSimplyHelper.EntityState.Active:
                    condition 
= "[IsActive]=true";
                    
break;
                
case BreakerSimplyHelper.EntityState.NoActive:
                    condition 
= "[IsActive]=false";
                    
break;
                
case BreakerSimplyHelper.EntityState.All:
                    condition 
= "1=1";
                    
break;
            }

            
            
string sOrderString = "Order By ID Desc";
            
if (oBL.SelectArticleColumnWhere(sOrderString,condition,out ArticleColumnCollection))
            
{
                
return ArticleColumnCollection;
            }

            
else
            
{
                
throw new Exception();
            }

        }

        
/// <summary>
        
/// 根据栏目查询Entity的集合
        
/// </summary>
        
/// <param name="nColumnID">栏目ID</param>
        
/// <returns>EntityCollection</returns>

        public static ArticleColumnCollection SelectArticleColumnCollectionWhere(int nColumnID)
        
{
            ArticleColumnCollection ArticleColumnCollection;
            ArticleColumnBL oBL 
= new ArticleColumnBL();
            
            
string sCondition = "ColumnID =" + nColumnID;
            
if (oBL.SelectArticleColumnWhere(sCondition,out ArticleColumnCollection))
            
{
                
return ArticleColumnCollection;
            }

            
else
            
{
                
throw new Exception();
            }

        }

    }

}



 

Article

// BreakerLib V1.0;
namespace  BreakerLib
{
    
/// <summary>
    
/// Address 的摘要说明。
    
/// </summary>

    public class Article : ArticleMD
    
{
        
public Article()
        
{
            
        }


        
...
    }

}

ArticleMD

// BreakerLib V1.0;
using  System;
using  System.Data;
using  System.Data.OleDb;
namespace  BreakerLib
{
    
/// <summary>
    
/// Article Model Object,
    
/// </summary>

    public class ArticleMD :BaseHelper
    
{
        
//private fields
         private String m_sAuthor;
         
private Int32 m_nColumnID;
         
private String m_sContent;
         
private DateTime m_dCreatedTime;
         
private Int32 m_nID;
         
private Boolean m_bIsActive;
         
private String m_sRecommededPicture;
         
private String m_sTitle;
         
private String m_sUUID;
        
        
//public properties
        
//summary
        
//
        
//summary
        public String Author
        
{
            
get{return m_sAuthor;}
            
set{m_sAuthor = value;}
        }
    
        
//summary
        
//
        
//summary
        public Int32 ColumnID
        
{
            
get{return m_nColumnID;}
            
set{m_nColumnID = value;}
        }
    
        
//summary
        
//
        
//summary
        public String Content
        
{
            
get{return m_sContent;}
            
set{m_sContent = value;}
        }
    
        
//summary
        
//
        
//summary
        public DateTime CreatedTime
        
{
            
get{return m_dCreatedTime;}
            
set{m_dCreatedTime = value;}
        }
    
        
//summary
        
//
        
//summary
        public Int32 ID
        
{
            
get{return m_nID;}
            
set{m_nID = value;}
        }
    
        
//summary
        
//
        
//summary
        public Boolean IsActive
        
{
            
get{return m_bIsActive;}
            
set{m_bIsActive = value;}
        }
    
        
//summary
        
//
        
//summary
        public String RecommededPicture
        
{
            
get{return m_sRecommededPicture;}
            
set{m_sRecommededPicture = value;}
        }
    
        
//summary
        
//
        
//summary
        public String Title
        
{
            
get{return m_sTitle;}
            
set{m_sTitle = value;}
        }
    
        
//summary
        
//
        
//summary
        public String UUID
        
{
            
get{return m_sUUID;}
            
set{m_sUUID = value;}
        }
    
    
            
//Save Data
            
//将属性值保存到 OleDbParameter 数组
            
//除去只读字段ID
            OleDbParameter
            
从 OleDbParameter Array 中获取数据填充到 Entity
            
            
从 IDataRecord 中获取数据填充到 Entity
            
            
从 IDataRecord 中获取数据填充到 Entity Collection
}

}

ArticleCollection

namespace  BreakerLib
{
    
using System.Collections ;
    
using System;
    
    
public class ArticleCollection:CollectionBase
    
{
        
/// <summary>
        
/// Gets or sets the value associated with the specified key
        
/// </summary>

        public Article thisint index ]  
        
{
            
get  return( (Article) List[index] );}
            
set  { List[index] = value;}
        }


        
/// <summary>
        
/// Adds an item to the Article Collection
        
/// </summary>

        public int Add( Article value )  
        
{
            
return( List.Add( value ) );
        }


        
/// <summary>
        
/// Determines the index of a specific item in the  Article Collection
        
/// </summary>

        public int IndexOf( Article value )  
        
{
            
return( List.IndexOf( value ) );
        }


        
/// <summary>
        
/// Inserts an item to the Article Collection at the specified position
        
/// </summary>

        public void Insert( int index, Article value )  
        
{
            List.Insert( index, value );
        }


        
/// <summary>
        
/// Removes the first occurrence of Article in the Article Collection
        
/// </summary>

        public void Remove( Article value )  
        
{
            List.Remove( value );
        }


        
/// <summary>
        
/// Determines whether the Article Collection contains a specific Article
        
/// </summary>

        public bool Contains( Article value )  
        
{
            
// If value is not of type Article, this will return false.
            return( List.Contains( value ) );
        }


        
/// <summary>
        
/// Valiadtes before inserting a new Article into the Article Collection
        
/// </summary>

        protected override void OnInsert( int index, Object value )  
        
{
            
if ( value.GetType() != Type.GetType("BreakerLib.Article,BreakerLib") )
                
throw new ArgumentException( "value must be of type Article.""value" );
        }


        
/// <summary>
        
/// Valiadtes before removing a new Article into the Article Collection
        
/// </summary>

        protected override void OnRemove( int index, Object value )  
        
{
            
if ( value.GetType() != Type.GetType("BreakerLib.Article,BreakerLib") )
                
throw new ArgumentException( "value must be of type Article.""value" );
        }


        
/// <summary>
        
/// Valiadtes before setting a Article in Article Collection
        
/// </summary>

        protected override void OnSet( int index, Object oldValue, Object newValue )  
        
{
            
if ( newValue.GetType() != Type.GetType("BreakerLib.Article,BreakerLib") )
                
throw new ArgumentException( "newValue must be of type Article.""newValue" );
        }


        
/// <summary>
        
/// Performs additional custom processes when validating a value Article
        
/// </summary>

        protected override void OnValidate( Object value )  
        
{
            
if ( value.GetType() != Type.GetType("BreakerLib.Article,BreakerLib") )
                
throw new ArgumentException( "value must be of type Article." );
        }

    }

}


ArticleDAO

 

// BreakerLib V1.0;
using  System;
using  System.Data;
using  System.Data.OleDb;
namespace  BreakerLib
{
    
    
/// <summary>
    
/// ArticleDAO。
    
/// </summary>

    public class ArticleDAO
    
{
        
//createEntity
        
        
//Update Entity
        
        
删除实体
        
        
对上面已定义的DAO根据具体的需要再进行一次封装
        
选择全部的实体
        
        
判断实体是否存在
    
    
/// <summary>
    
/// 计算文章的总数
    
/// </summary>
    
/// <param name="Condition"></param>
    
/// <param name="nCount"></param>
    
/// <returns></returns>

    public bool CountArticleWhere(string Condition ,out int nCount)
    
{
        nCount 
= 0;
        
string strSQL = string.Format("select Count (*) As nRecordCount  From [Article] Where  {0}", Condition);
        DAOHelper data 
= new DAOHelper();
        OleDbDataReader dr 
= null;
        data.RunSQL(strSQL, 
out dr);
        
        
if (dr.Read())
        
{
            nCount 
= Convert.ToInt32(dr["nRecordCount"]);
            
return true;
        }

        
else
        
{
            
return false;
        }

    }

}
    
}
    

ArticleBL

 

// Version:BreakerLib V1.0
using  System;

namespace  BreakerLib
{
    
/// <summary>
    
/// Article 的摘要说明。
    
/// </summary>

    public class ArticleBL:ArticleDAO
    
{
        
public ArticleBL()
        
{
            
//
            
// TODO: 在此处添加构造函数逻辑
            
//
        }

        
        
/// <summary>
        
/// 需要更新的实体
        
/// </summary>
        
/// <param name="article"></param>
        
/// <returns>成功与否</returns>

        public static bool  UpdateArticle(Article article)
        
{
            ArticleBL oBL 
= new ArticleBL();
            
return oBL.UpdataArticle(article);
        }

        
/// <summary>
        
/// 删除实体
        
/// </summary>
        
/// <param name="nID">实体的ID</param>
        
/// <returns>成功与否</returns>

        public static bool  DeleteArticleWhere(int nID)
        
{
            ArticleBL oBL 
= new ArticleBL();
            
return oBL.DeleteArticle(nID);
        }

        
/// <summary>
        
/// 查询实体
        
/// </summary>
        
/// <param name="ID">实体的ID</param>
        
/// <returns>返回Entity</returns>

        public static Article SelectArticleWhere(string ID)
        
{
            Article article;
            ArticleBL oBL 
= new ArticleBL();
            
if (oBL.SelectArticleByPK( ID, out article))
            
{
                
return article;
            }

            
else
            
{
                
throw new Exception();
            }

        }

        
/// <summary>
        
/// 查出全部Entity集合
        
/// </summary>
        
/// <returns>EntityCollection</returns>

        public static ArticleCollection SelectArticleCollectionWhere(BreakerSimplyHelper.EntityState state)
        
{
            ArticleCollection ArticleCollection;
            ArticleBL oBL 
= new ArticleBL();
            
string condition = "";
            
switch (state)
            
{
                
case BreakerSimplyHelper.EntityState.Active:
                    condition 
= "[IsActive]=true";
                    
break;
                
case BreakerSimplyHelper.EntityState.NoActive:
                    condition 
= "[IsActive]=false";
                    
break;
                
case BreakerSimplyHelper.EntityState.All:
                    condition 
= "1=1";
                    
break;
            }

            
string sOrderString = "Order By ID Desc";
            
if (oBL.SelectArticleWhere(sOrderString,condition,out ArticleCollection))
            
{
                
return ArticleCollection;
            }

            
else
            
{
                
throw new Exception();
            }

        }

        
/// <summary>
        
/// 根据自定义条件,查询全部Entity集合
        
/// </summary>
        
/// <returns>EntityCollection</returns>

        public static ArticleCollection SelectArticleCollectionWhere(string sCondition,string sOrderString,BreakerSimplyHelper.EntityState state)
        
{
            ArticleCollection ArticleCollection;
            ArticleBL oBL 
= new ArticleBL();
            
switch (state)
            
{
                
case BreakerSimplyHelper.EntityState.Active:
                    sCondition 
+= "[IsActive]=true";
                    
break;
                
case BreakerSimplyHelper.EntityState.NoActive:
                    sCondition 
+= "[IsActive]=false";
                    
break;
                
case BreakerSimplyHelper.EntityState.All:
                    sCondition 
+= "1=1";
                    
break;
            }

            
if (oBL.SelectArticleWhere(sOrderString,sCondition,out ArticleCollection))
            
{
                
return ArticleCollection;
            }

            
else
            
{
                
throw new Exception();
            }

        }

        
/// <summary>
        
/// 根据栏目查询Entity的集合
        
/// </summary>
        
/// <param name="nColumnID">栏目ID</param>
        
/// <returns>EntityCollection</returns>

        public static ArticleCollection SelectArticleCollectionWhere(int nColumnID,BreakerSimplyHelper.EntityState state)
        
{
            ArticleCollection ArticleCollection;
            ArticleBL oBL 
= new ArticleBL();
            
string condition = "";
            
            
if (nColumnID > 0)
            
{
                condition 
= "ColumnID =" + nColumnID+" And ";
            }

            
else
            
{
                condition 
= "";
            }

        
            
switch (state)
            
{
                
case BreakerSimplyHelper.EntityState.Active:
                    condition 
+= "[IsActive]=true";
                    
break;
                
case BreakerSimplyHelper.EntityState.NoActive:
                    condition 
+= "[IsActive]=false";
                    
break;
                
case BreakerSimplyHelper.EntityState.All:
                    condition 
+= "1=1";
                    
break;
            }

            
if (oBL.SelectArticleWhere(condition,out ArticleCollection))
            
{
                
return ArticleCollection;
            }

            
else
            
{
                
throw new Exception();
            }

        }

        
/// <summary>
        
/// 按条件查出全部Entity集合,并且分页
        
/// </summary>
        
/// <returns>EntityCollection</returns>

        public static ArticleCollection SelectArticleCollectionWhere(int ColumnID ,String sOrderString, Int32 nPageSize, Int32 nPageIndex,BreakerSimplyHelper.EntityState state)
        
{
            ArticleCollection ArticleCollection;
            ArticleBL oBL 
= new ArticleBL();
            
string condition = "";
            
switch (state)
            
{
                
case BreakerSimplyHelper.EntityState.Active:
                    condition 
= "[IsActive]=true";
                    
break;
                
case BreakerSimplyHelper.EntityState.NoActive:
                    condition 
= "[IsActive]=false";
                    
break;
                
case BreakerSimplyHelper.EntityState.All:
                
                    
break;
            }

            
if (ColumnID >0)
            
{
                
if (ColumnID > 0 )
                    condition 
+= " And ColumnID = " + ColumnID;
                
else
                    condition 
+= "1=1 ";
            }

            
            
if (oBL.SelectArticleWhere(sOrderString,  condition,  nPageSize, nPageIndex,
                                     
out  ArticleCollection))
            
{
                
return ArticleCollection;
            }

            
else
            
{
                
throw new Exception();
            }

        }

        
/// <summary>
        
/// 按条件查出全部Entity集合,并且分页
        
/// </summary>
        
/// <returns>EntityCollection</returns>

        public static ArticleCollection SelectArticleCollectionWhere(String sOrderString, Int32 nPageSize, Int32 nPageIndex,BreakerSimplyHelper.EntityState state)
        
{
            
return SelectArticleCollectionWhere(0, sOrderString, nPageSize, nPageIndex, state);
        }

        
        
/// <summary>
        
/// 根据是否启用的状态,计算全部的图册的总数
        
/// </summary>
        
/// <returns>图册的总数</returns>

        public static int CountArticle(BreakerSimplyHelper.EntityState state)
        
{
            
int nCount = 0;
            ArticleBL oBL 
= new ArticleBL();
            
string condition = "";
            
switch (state)
            
{
                
case BreakerSimplyHelper.EntityState.Active:
                    condition 
= "[IsActive]=true";
                    
break;
                
case BreakerSimplyHelper.EntityState.NoActive:
                    condition 
= "[IsActive]=false";
                    
break;
                
case BreakerSimplyHelper.EntityState.All:
                    condition 
= "1=1";
                    
break;
            }

            
if (oBL.CountArticleWhere(condition, out nCount))
            
{
                
return nCount;
            }

            
else
            
{
                
throw new Exception();
            }

        }

        
/// <summary>
        
/// 根据是否启用的状态与栏目计算图片数
        
/// </summary>
        
/// <returns>图册的总数</returns>

        public static int CountArticle(int ColumnID,BreakerSimplyHelper.EntityState state)
        
{
            
int nCount = 0;
            ArticleBL oBL 
= new ArticleBL();
            
string condition = "";
            
            
switch (state)
            
{
                
case BreakerSimplyHelper.EntityState.Active:
                    condition 
= "[IsActive]=true";
                    
break;
                
case BreakerSimplyHelper.EntityState.NoActive:
                    condition 
= "[IsActive]=false";
                    
break;
                
case BreakerSimplyHelper.EntityState.All:
                    
break;
            }

            
if (ColumnID >0)
            
{
                
if (ColumnID > 0 )
                    condition 
+= " And ColumnID = " + ColumnID;
                
else
                    condition 
+= "1=1 ";
            }

            
            
if (oBL.CountArticleWhere(condition, out nCount))
            
{
                
return nCount;
            }

            
else
            
{
                
throw new Exception();
            }

        }

    }

}




 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值