Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
92ef29a1
Commit
92ef29a1
authored
Mar 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增流水号字段
parent
ffe4ce65
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
RB_Course_Offer.cs
Edu.Model/Entity/Course/RB_Course_Offer.cs
+5
-1
CourseOfferModule.cs
Edu.Module.Course/CourseOfferModule.cs
+2
-0
RB_Course_OfferRepository.cs
Edu.Repository/Course/RB_Course_OfferRepository.cs
+17
-0
No files found.
Edu.Model/Entity/Course/RB_Course_Offer.cs
View file @
92ef29a1
...
...
@@ -17,12 +17,16 @@ namespace Edu.Model.Entity.Course
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 流水号
/// </summary>
public
string
SerialNum
{
get
;
set
;
}
/// <summary>
/// 报价单名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 有效期开始时间
/// </summary>
...
...
Edu.Module.Course/CourseOfferModule.cs
View file @
92ef29a1
...
...
@@ -85,6 +85,8 @@ namespace Edu.Module.Course
}
else
{
//生成报价单流水号
model
.
SerialNum
=
course_OfferRepository
.
CreateSerialNumRepository
();
var
newId
=
course_OfferRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
...
...
Edu.Repository/Course/RB_Course_OfferRepository.cs
View file @
92ef29a1
...
...
@@ -148,5 +148,22 @@ WHERE 1=1
}
return
Get
<
RB_Course_Offer_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 生成报价单流水号
/// </summary>
/// <returns></returns>
public
string
CreateSerialNumRepository
()
{
int
count
=
0
;
string
sql
=
" SELECT COUNT(1) FROM RB_Course_Offer "
;
var
obj
=
base
.
ExecuteScalar
(
sql
);
if
(
obj
!=
null
)
{
Int32
.
TryParse
(
obj
.
ToString
(),
out
count
);
}
string
result
=
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
(
count
+
1
).
ToString
(
"D4"
);
return
result
;
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment