/// <summary>
		/// 获得数据列表
		/// </summary>
		public List<DB_TeleBill.Model.m_RoleAuthority> DataTableToList(DataSet ds)
		{
			List<DB_TeleBill.Model.m_RoleAuthority> modelList = new List<DB_TeleBill.Model.m_RoleAuthority>();
			if (ds == null) return modelList;
            DataTable dt = ds.Tables[0];
			int rowsCount = dt.Rows.Count;
			if (rowsCount > 0)
			{
				DB_TeleBill.Model.m_RoleAuthority model;
				for (int n = 0; n < rowsCount; n++)
				{
				  model = new DB_TeleBill.Model.m_RoleAuthority();	
                  if(dt.Rows[n]["ID"]!=null && dt.Rows[n]["ID"].ToString()!="")
				  {
				      model.ID=int.Parse(dt.Rows[n]["ID"].ToString());
				  }
				  if(dt.Rows[n]["roleID"]!=null && dt.Rows[n]["roleID"].ToString()!="")
				  {
				      model.roleID=int.Parse(dt.Rows[n]["roleID"].ToString());
				  }
				  if(dt.Rows[n]["vc_ModuleName"]!=null && dt.Rows[n]["vc_ModuleName"].ToString()!="")
				  {
				     model.vc_ModuleName= dt.Rows[n]["vc_ModuleName"].ToString();
				  }
				  if(dt.Rows[n]["vc_Memo"]!=null && dt.Rows[n]["vc_Memo"].ToString()!="")
				  {
				     model.vc_Memo= dt.Rows[n]["vc_Memo"].ToString();
				  }
				  if(dt.Rows[n]["i_Flag"]!=null && dt.Rows[n]["i_Flag"].ToString()!="")
				  {
				      model.i_Flag=int.Parse(dt.Rows[n]["i_Flag"].ToString());
				  }
				   modelList.Add(model);
				
				}
			}
			return modelList;
		}
		/// <summary>
		/// 根据条件得到一个对象实体
		/// </summary>
		public DB_TeleBill.Model.m_RoleAuthority GetModel(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("  select top 1 ");
			strSql.Append("  ID, roleID, vc_ModuleName, vc_Memo, i_Flag  ");			
			strSql.Append("  from m_RoleAuthority ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			DB_TeleBill.Model.m_RoleAuthority model=new DB_TeleBill.Model.m_RoleAuthority();
			DataSet ds=GetDataSet(strSql.ToString());
			if(ds!=null && ds.Tables[0].Rows.Count>0)
			{
                model=DataTableToList(ds)[0];						
				return model;
			}
			else
			{
				return null;
			}
		}