-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tangxiaojun
committed
Jun 2, 2016
1 parent
419ec3b
commit a6adcb1
Showing
16 changed files
with
1,323 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using MY.Model; | ||
namespace MY.BLL | ||
{ | ||
|
||
/// <summary> | ||
/// HW_Bank 操作类 | ||
/// </summary> | ||
public partial class HW_BankDal | ||
{ | ||
|
||
|
||
public static HW_Bank Select() | ||
{ | ||
using(var context = db.Context()) | ||
{ | ||
return context.Sql(" SELECT * FROM HW_Bank WHERE ") | ||
.QuerySingle<HW_Bank>(); | ||
} | ||
} | ||
|
||
public static List<HW_Bank> SelectAll() | ||
{ | ||
return SelectAll(string.Empty); | ||
} | ||
|
||
public static List<HW_Bank> SelectAll(string sortExpression) | ||
{ | ||
return SelectAll(0, 0, sortExpression); | ||
} | ||
|
||
public static List<HW_Bank> SelectAll(int startRowIndex, int maximumRows, string sortExpression) | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
var select = context.Select<HW_Bank>(" * ") | ||
.From(" HW_Bank "); | ||
|
||
if (maximumRows > 0) | ||
{ | ||
if (startRowIndex == 0) | ||
startRowIndex = 1; | ||
|
||
select.Paging(startRowIndex, maximumRows); | ||
} | ||
|
||
if (!string.IsNullOrEmpty(sortExpression)) | ||
select.OrderBy(sortExpression); | ||
|
||
return select.QueryMany(); | ||
} | ||
} | ||
|
||
public static int CountAll() | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Sql(" SELECT COUNT(*) FROM HW_Bank ") | ||
.QuerySingle<int>(); | ||
} | ||
} | ||
|
||
|
||
public static bool Insert(HW_Bank hW_Bank) | ||
{ | ||
using (var context =db.Context()) | ||
{ | ||
return context.Insert<HW_Bank>("HW_Bank", hW_Bank) | ||
.Execute() > 0; | ||
} | ||
} | ||
public static bool Update(HW_Bank hW_Bank) | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Update<HW_Bank>("HW_Bank", hW_Bank) | ||
.AutoMap(x => ) | ||
.Execute() > 0; | ||
} | ||
} | ||
|
||
public static bool Delete(HW_Bank hW_Bank) | ||
{ | ||
return Delete(); | ||
} | ||
|
||
public static bool Delete() | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Sql(" DELETE FROM Product WHERE ") | ||
.Execute() > 0; | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using MY.Model; | ||
namespace MY.BLL | ||
{ | ||
|
||
/// <summary> | ||
/// HW_CategoryQuestion 操作类 | ||
/// </summary> | ||
public partial class HW_CategoryQuestionDal | ||
{ | ||
|
||
|
||
public static HW_CategoryQuestion Select() | ||
{ | ||
using(var context = db.Context()) | ||
{ | ||
return context.Sql(" SELECT * FROM HW_CategoryQuestion WHERE ") | ||
.QuerySingle<HW_CategoryQuestion>(); | ||
} | ||
} | ||
|
||
public static List<HW_CategoryQuestion> SelectAll() | ||
{ | ||
return SelectAll(string.Empty); | ||
} | ||
|
||
public static List<HW_CategoryQuestion> SelectAll(string sortExpression) | ||
{ | ||
return SelectAll(0, 0, sortExpression); | ||
} | ||
|
||
public static List<HW_CategoryQuestion> SelectAll(int startRowIndex, int maximumRows, string sortExpression) | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
var select = context.Select<HW_CategoryQuestion>(" * ") | ||
.From(" HW_CategoryQuestion "); | ||
|
||
if (maximumRows > 0) | ||
{ | ||
if (startRowIndex == 0) | ||
startRowIndex = 1; | ||
|
||
select.Paging(startRowIndex, maximumRows); | ||
} | ||
|
||
if (!string.IsNullOrEmpty(sortExpression)) | ||
select.OrderBy(sortExpression); | ||
|
||
return select.QueryMany(); | ||
} | ||
} | ||
|
||
public static int CountAll() | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Sql(" SELECT COUNT(*) FROM HW_CategoryQuestion ") | ||
.QuerySingle<int>(); | ||
} | ||
} | ||
|
||
|
||
public static bool Insert(HW_CategoryQuestion hW_CategoryQuestion) | ||
{ | ||
using (var context =db.Context()) | ||
{ | ||
return context.Insert<HW_CategoryQuestion>("HW_CategoryQuestion", hW_CategoryQuestion) | ||
.Execute() > 0; | ||
} | ||
} | ||
public static bool Update(HW_CategoryQuestion hW_CategoryQuestion) | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Update<HW_CategoryQuestion>("HW_CategoryQuestion", hW_CategoryQuestion) | ||
.AutoMap(x => ) | ||
.Execute() > 0; | ||
} | ||
} | ||
|
||
public static bool Delete(HW_CategoryQuestion hW_CategoryQuestion) | ||
{ | ||
return Delete(); | ||
} | ||
|
||
public static bool Delete() | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Sql(" DELETE FROM Product WHERE ") | ||
.Execute() > 0; | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using MY.Model; | ||
namespace MY.BLL | ||
{ | ||
|
||
/// <summary> | ||
/// HW_NodeCategory 操作类 | ||
/// </summary> | ||
public partial class HW_NodeCategoryDal | ||
{ | ||
|
||
|
||
public static HW_NodeCategory Select() | ||
{ | ||
using(var context = db.Context()) | ||
{ | ||
return context.Sql(" SELECT * FROM HW_NodeCategory WHERE ") | ||
.QuerySingle<HW_NodeCategory>(); | ||
} | ||
} | ||
|
||
public static List<HW_NodeCategory> SelectAll() | ||
{ | ||
return SelectAll(string.Empty); | ||
} | ||
|
||
public static List<HW_NodeCategory> SelectAll(string sortExpression) | ||
{ | ||
return SelectAll(0, 0, sortExpression); | ||
} | ||
|
||
public static List<HW_NodeCategory> SelectAll(int startRowIndex, int maximumRows, string sortExpression) | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
var select = context.Select<HW_NodeCategory>(" * ") | ||
.From(" HW_NodeCategory "); | ||
|
||
if (maximumRows > 0) | ||
{ | ||
if (startRowIndex == 0) | ||
startRowIndex = 1; | ||
|
||
select.Paging(startRowIndex, maximumRows); | ||
} | ||
|
||
if (!string.IsNullOrEmpty(sortExpression)) | ||
select.OrderBy(sortExpression); | ||
|
||
return select.QueryMany(); | ||
} | ||
} | ||
|
||
public static int CountAll() | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Sql(" SELECT COUNT(*) FROM HW_NodeCategory ") | ||
.QuerySingle<int>(); | ||
} | ||
} | ||
|
||
|
||
public static bool Insert(HW_NodeCategory hW_NodeCategory) | ||
{ | ||
using (var context =db.Context()) | ||
{ | ||
return context.Insert<HW_NodeCategory>("HW_NodeCategory", hW_NodeCategory) | ||
.Execute() > 0; | ||
} | ||
} | ||
public static bool Update(HW_NodeCategory hW_NodeCategory) | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Update<HW_NodeCategory>("HW_NodeCategory", hW_NodeCategory) | ||
.AutoMap(x => ) | ||
.Execute() > 0; | ||
} | ||
} | ||
|
||
public static bool Delete(HW_NodeCategory hW_NodeCategory) | ||
{ | ||
return Delete(); | ||
} | ||
|
||
public static bool Delete() | ||
{ | ||
using (var context = db.Context()) | ||
{ | ||
return context.Sql(" DELETE FROM Product WHERE ") | ||
.Execute() > 0; | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.