/**
* Get Agent List By Query [Rows]
 */
Get Agent List By Query [Rows]
/ ** * Get Agent List By Query [ Rows ] * /
func (this *AgentModel) GetAgentListByRows(list []*Agent, rows *sql.Rows) []*Agent {
	for rows.Next() {
		agent := &Agent{Manager: &Account{}}
		err := rows.Scan(&agent.AgentId, &agent.Name, &agent.Contacts, &agent.Mobile, &agent.Mail, &agent.Note, &agent.Timex, &agent.Manager.AccountId)
		if err != nil {
			beego.Error(err)
			return list
		}
		list = append(list, agent)
	}
	rows.Close()
	return list
}
func ( this * AgentModel ) GetAgentListByRows ( list [ ] * Agent , rows * sql . Rows ) [ ] * Agent { for rows . Next ( ) { agent := & Agent { Manager : & Account { } } err := rows . Scan ( & agent . AgentId , & agent . Name , & agent . Contacts , & agent . Mobile , & agent . Mail , & agent . Note , & agent . Timex , & agent . Manager . AccountId ) if err != nil { beego . Error ( err ) return list } list = append ( list , agent ) } rows . Close ( ) return list }
Get Agent List By Query [Rows]
Get Agent List By Query [ Rows ]