Asp.net源码专业站
首页->控件应用->iBatisNet入门示例源码(操作GridView和DetailsView)>>IBatisNetDemo/Service/PersonService.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:iBatisNet入门示例源码(操作GridView和DetailsView)
当前文件:文件类型 IBatisNet_GridView_DetailsView_QuikStart/IBatisNetDemo/Service/PersonService.cs[2K,2009-6-12 11:44:51]打开代码结构图
普通视图
		            
1Apache Notice 24using System; 25using System.Collections.Generic; 26using System.Text; 27using IBatisNetDemo.Domain; 28 29/// download from www.51aspx.com(51aspx.com) 30 31namespace IBatisNetDemo.Service 32{ 33 public class PersonService : BaseService 34 { 35 36 public PersonService() 37 { 38 39 } 40 41 public IList<Person> GetAllPerson() 42 { 43 IList<Person> list = null; 44 list = SqlMap.QueryForList<Person>("SelectAllPerson", null); 45 return list; 46 } 47 48 public Person GetPerson(int Id) 49 { 50 Person person = SqlMap.QueryForObject<Person>("", Id); 51 return person; 52 } 53 54 public int Create(Person person) 55 { 56 int Id = (int)SqlMap.Insert("InsertPerson", person); 57 SqlMap.CommitTransaction(); 58 59 60 return Id; 61 } 62 63 public void Update(Person person) 64 { 65 SqlMap.Update("UpdatePerson", person); 66 } 67 68 public void Delete(Person person) 69 { 70 SqlMap.Delete("DeletePerson", person); 71 } 72 73 74 } 75} 76
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:iBatisNet入门示例源码(操作GridView和DetailsView)
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146