/// <summary>
 /// 得到一个对象实体
 /// </summary>
 public PermissionSystem.Model.GroupPermission DataRowToModel(DataRow row)
 {
     PermissionSystem.Model.GroupPermission model=new PermissionSystem.Model.GroupPermission();
     if (row != null)
     {
         if(row["group_permission_id"]!=null && row["group_permission_id"].ToString()!="")
         {
             model.group_permission_id=long.Parse(row["group_permission_id"].ToString());
         }
         if(row["group_id"]!=null && row["group_id"].ToString()!="")
         {
             model.group_id=long.Parse(row["group_id"].ToString());
         }
         if(row["permission_id"]!=null && row["permission_id"].ToString()!="")
         {
             model.permission_id=long.Parse(row["permission_id"].ToString());
         }
         if(row["permission_type_id"]!=null && row["permission_type_id"].ToString()!="")
         {
             model.permission_type_id=long.Parse(row["permission_type_id"].ToString());
         }
     }
     return model;
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public PermissionSystem.Model.GroupPermission GetModel(long group_permission_id)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("select  top 1 group_permission_id,group_id,permission_id,permission_type_id from GroupPermission ");
            strSql.Append(" where group_permission_id=@group_permission_id");
            SqlParameter[] parameters = {
                    new SqlParameter("@group_permission_id", SqlDbType.BigInt)
            };
            parameters[0].Value = group_permission_id;

            PermissionSystem.Model.GroupPermission model=new PermissionSystem.Model.GroupPermission();
            DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
            if(ds.Tables[0].Rows.Count>0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }