您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->酒店管理系统(ExtJs)源码>>HotelDAL/UserInfoDAO.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:酒店管理系统(ExtJs)源码
当前文件:文件类型 MyHotelManager/HotelDAL/UserInfoDAO.cs打开代码结构图
普通视图
		            
1using System; 2using System.Collections.Generic; 3using System.Text; 4using System.Data; 5using System.Data.SqlClient; 6using HotelModels; 7 8namespace HotelDAL 9{ 10 public class UserInfoDAO 11 { 12 SqlHelper sh = new SqlHelper(); 13 DataSet ds; 14 private SqlParameter para; //参数 15 16 17 18 /// <summary> 19 /// 用户登录 20 /// </summary> 21 /// <param name="uib"></param> 22 /// <returns></returns> 23 public DataTable GetLogin(UserInfoBean uib) 24 { 25 SqlParameter[] sp ={ 26 para = new SqlParameter("@LoginName",uib.LoginName), 27 para = new SqlParameter("@LoginPass",uib.LoginPass) 28 }; 29 ds = sh.GetDataSet("GetLogin", sp); 30 return ds.Tables[0]; 31 } 32 33 34 35 /// <summary> 36 /// 检查登录名是否重复 37 /// </summary> 38 /// <param name="UserId"></param> 39 /// <returns></returns> 40 public DataSet CheckUserId(string UserId) 41 { 42 try 43 { 44 SqlParameter[] sp ={ 45 para = new SqlParameter("@LoginName",UserId) 46 }; 47 ds = sh.GetDataSet("CheckUserId", sp); 48 } 49 catch (Exception ex) 50 { 51 throw ex; 52 } 53 return ds; 54 } 55 56 57 /// <summary> 58 /// 添加普通员工 59 /// </summary> 60 /// <param name="uib"></param> 61 /// <returns></returns> 62 public int AddUser(UserInfoBean uib) 63 { 64 int count = 0; 65 try 66 { 67 SqlParameter[] sp ={ 68 para = new SqlParameter("@LoginName",uib.LoginName), 69 para = new SqlParameter("@LoginPass",uib.LoginPass), 70 para = new SqlParameter("@UserName",uib.UserName), 71 para = new SqlParameter("@Remark",uib.Remark) 72 }; 73 count = sh.RunSql("AddUser", sp); 74 } 75 catch (Exception ex) 76 { 77 throw ex; 78 } 79 return count; 80 } 81 82 83 84 /// <summary> 85 /// 查询所有员工(删除用到) 86 /// </summary> 87 /// <param name="LoginName"></param> 88 /// <returns></returns> 89 public DataSet GetUser(string LoginName) 90 { 91 try 92 { 93 SqlParameter[] sp ={ 94 para = new SqlParameter("@LoginName",LoginName) 95 }; 96 ds = sh.GetDataSet("GetUser", sp); 97 } 98 catch (Exception ex) 99 { 100 throw ex; 101 } 102 return ds; 103 } 104 105 106 107 /// <summary> 108 /// 删除员工(根据Id删除) 109 /// </summary> 110 /// <param name="UserId"></param> 111 /// <returns></returns> 112 public int DelUser(int UserId) 113 { 114 int count = 0; 115 try 116 { 117 SqlParameter[] sp ={ 118 para = new SqlParameter("@UserId",UserId) 119 }; 120 count = sh.RunSql("DelUser", sp); 121 } 122 catch (Exception ex) 123 { 124 throw ex; 125 } 126 return count; 127 } 128 } 129} 130
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:酒店管理系统(ExtJs)源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号