// 根据主键userID返回指定的Users实体 public static UsersBusEntity GetEntity(string userName) { UsersByUserName exec = new UsersByUserName(); exec.Username = userName; UsersBusEntity obj = new UsersBusEntity(); obj.MetaDataTable = exec.ExecDataTable(); return obj; }
// 根据主键userID返回指定的Users实体 public static UsersBusEntity GetEntity(int userID) { UsersByPK exec = new UsersByPK(); exec.UserID = userID; UsersBusEntity obj = new UsersBusEntity(); obj.MetaDataTable = exec.ExecDataTable(); return obj; }
// 根据主键userName和userPwd返回指定的Users实体 public static UsersBusEntity GetEntity(string userName,string userPwd) { UsersByUserNameAndUserPwd exec = new UsersByUserNameAndUserPwd(); exec.Username = userName; exec.Userpwd = userPwd; UsersBusEntity obj = new UsersBusEntity(); obj.MetaDataTable = exec.ExecDataTable(); return obj; }
// 根据主键userID返回指定的Users实体 public static UsersBusEntity GetEntity(string userName) { UsersByUserName exec = new UsersByUserName(); exec.Username = userName; UsersBusEntity obj = new UsersBusEntity(); obj.MetaDataTable = exec.ExecDataTable(); return(obj); }
// 根据主键userID返回指定的Users实体 public static UsersBusEntity GetEntity(int userID) { UsersByPK exec = new UsersByPK(); exec.UserID = userID; UsersBusEntity obj = new UsersBusEntity(); obj.MetaDataTable = exec.ExecDataTable(); return(obj); }
// 根据主键userName和userPwd返回指定的Users实体 public static UsersBusEntity GetEntity(string userName, string userPwd) { UsersByUserNameAndUserPwd exec = new UsersByUserNameAndUserPwd(); exec.Username = userName; exec.Userpwd = userPwd; UsersBusEntity obj = new UsersBusEntity(); obj.MetaDataTable = exec.ExecDataTable(); return(obj); }
// 公用静态方法,插入一条记录 InsertUsers public static bool InsertEntity(UsersBusEntity obj) { UsersInsert exec = new UsersInsert(); try { exec.ReceiveParameter(obj); exec.ExecNoQuery(); return true; } catch (Exception ex) { //throw ex; return false; } finally { obj = null; } }
// 公用静态方法,插入一条记录 InsertUsers public static bool InsertEntity(UsersBusEntity obj) { UsersInsert exec = new UsersInsert(); try { exec.ReceiveParameter(obj); exec.ExecNoQuery(); return(true); } catch (Exception ex) { //throw ex; return(false); } finally { obj = null; } }
// 公用静态方法,修改一条记录 UpdateUsers public static bool UpdateEntity(UsersBusEntity obj) { if (obj == null || obj.IsEmpty) { return false; } UsersUpdate exec = new UsersUpdate(); try { exec.ReceiveParameter(obj); exec.ExecNoQuery(); return true; } catch (Exception ex) { //throw ex; return false; } finally { obj = null; } }
// 公用静态方法,修改一条记录 UpdateUsers public static bool UpdateEntity(UsersBusEntity obj) { if (obj == null || obj.IsEmpty) { return(false); } UsersUpdate exec = new UsersUpdate(); try { exec.ReceiveParameter(obj); exec.ExecNoQuery(); return(true); } catch (Exception ex) { //throw ex; return(false); } finally { obj = null; } }
// 修改由实体指定的一条记录 ModifyUsers public bool Modify(UsersBusEntity obj) { return(UpdateEntity(obj)); }
// 添加由实体指定的一条记录 AddUsers public bool Add(UsersBusEntity obj) { return(InsertEntity(obj)); }
// 修改由实体指定的一条记录 ModifyUsers public bool Modify(UsersBusEntity obj) { return UpdateEntity(obj); }
// 添加由实体指定的一条记录 AddUsers public bool Add(UsersBusEntity obj) { return InsertEntity(obj); }