【需求分析】
麥田培訓(xùn)學(xué)校管理軟件支持自定義數(shù)據(jù)集和修改打印報(bào)表,在消費(fèi)單上增加第一次上課時(shí)間內(nèi)容,這樣無(wú)論是正常開(kāi)課或者插班都可方便提醒學(xué)生上課。
【原理分析】
在本次消費(fèi)單內(nèi)容執(zhí)行選班后,找出在選班時(shí)間后第一次上課時(shí)間,并顯示在收據(jù)上。要求一定要先開(kāi)班排課,在選班好以后再打印收據(jù)。
【方法】
1.改數(shù)據(jù)集,增加第一次上課時(shí)間相關(guān)數(shù)據(jù)源。
table:LessonDegree
cmd: Select top 1 LessonDegree.StartDate from LessonDegree,BillItem ,StuClass,Class,Bill where Bill.BillID = BillItem.BillID and BillItem.StuClassID= StuClass.StuClassID and StuClass.ClassID= Class.ClassID and Class.ClassID= LessonDegree.ClassID and Bill.DateAndTime <=LessonDegree.StartDate and Bill.BillID = @BillID order by LessonDegree.StartDate
GO
2.改打印報(bào)表模板,添加第一次上課時(shí)間引用。
第一次上課時(shí)間:<xsl:value-of select="String:FormatDate('{0:yy年M月d日h時(shí)m分}',/ds/LessonDegree/StartDate)" /><br />
【實(shí)際效果】
76小票機(jī)數(shù)據(jù)集代碼示例
table:Bill
cmd: Select * from Bill where BillID = @BillID
GO
table:BillItem
cmd: Select * from BillItem where BillID = @BillID
GO
table:Student
cmd: Select Student.* from Student,Bill where Student.StudentID = Bill.StudentID and Bill.BillID = @BillID
GO
table:StuClass
cmd: Select StuClass.* from StuClass,BillItem where StuClass.BillItemID = BillItem.BillItemID and BillItem.BillID= @BillID
GO
table:Class
cmd: Select Class.*,StuClass.StuClassID from StuClass,BillItem,Class where StuClass.StuClassID = BillItem.StuClassID and StuClass.ClassID = Class.ClassID and BillItem.BillID= @BillID
GO
table:Shool
cmd: Select School.SchoolID,School.SchoolName,School.Tel,School.Address from School,Bill where School.SchoolID = Bill.PostSchoolID and Bill.BillID = @BillID
GO
table:LessonDegree
cmd: Select top 1 LessonDegree.StartDate from LessonDegree,BillItem ,StuClass,Class,Bill where Bill.BillID = BillItem.BillID and BillItem.StuClassID= StuClass.StuClassID and StuClass.ClassID= Class.ClassID and Class.ClassID= LessonDegree.ClassID and Bill.DateAndTime <=LessonDegree.StartDate and Bill.BillID = @BillID order by LessonDegree.StartDate
GO
76小票機(jī)打印模板代碼示例
?<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:String="urn:SWString">
<xsl:param name="SystemName"/>
<xsl:param name="SchoolName"/>
<xsl:param name="SiteUrl"/>
<xsl:param name="Email"/>
<xsl:param name="Tel"/>
<xsl:param name="Fax"/>
<xsl:param name="Address"/>
<xsl:param name="PostCode"/>
<xsl:param name="CurrencySymbol"/>
<xsl:param name="PrintTrueName"/>
<xsl:param name="PrintUserID"/>
<xsl:param name="PrintSchoolName"/>
<xsl:param name="PrintSchoolID"/>
<xsl:param name="PrintDateTime"/>
<xsl:template match="/">
<html>
<head>
<pagesetting>
<landscape>false</landscape>
<paperkind>Custom</paperkind>
<paperwidth>7.6cm</paperwidth>
<paperheight>0</paperheight>
<pageleft>4mm</pageleft>
<pageright>0mm</pageright>
<pagetop>0mm</pagetop>
<pagebottom>0mm</pagebottom>
<fontname>微軟雅黑</fontname>
<fontsize>10</fontsize>
<doctype>1</doctype>
<resolutionkind>3</resolutionkind>
<copies>1</copies>
</pagesetting>
<style>
.thead{
border-top-width:0mm;
border-left-width:0mm;
border-bottom-width:0mm;
border-right-width:0mm;
text-align:center;
font-style:bold
}
.bottom{
border-left-width:0mm;
border-bottom-width:0mm;
border-right-width:0mm;
}
.left{
border-left-width:0mm;
font-style:bold
}
.right{
border-right-width:0mm;
font-style:bold
}
.leftright{
border-left-width:0mm;
border-right-width:0mm;
font-style:bold
}
</style>
</head>
<body>
<table x="0cm" y="0" style="border:0mm">
<thead>
<tr height="3.2cm">
<td width="4.8cm" format="child">
<span x="0" y="0.5cm" style="width:7cm; height:1cm;text-align:center;font-size:17;">
<xsl:if test="ds/Bill/BillTypeID = 1">消費(fèi)單</xsl:if>
<xsl:if test="ds/Bill/BillTypeID = 0">退貨單</xsl:if>
</span>
<span x="0" y="1.4cm">
姓名:<xsl:value-of select="ds/Bill/StudentName" /><br />
學(xué)號(hào):<xsl:value-of select="ds/Bill/StudentID" /><br />
日期:<xsl:value-of select="String:FormatDate('{0:D}',ds/Bill/DateAndTime)" /><br />
流水號(hào):<xsl:value-of select="ds/Bill/BillID" />
</span>
</td>
</tr>
<tr height="0.8cm" style="border-bottom-width:0.2mm">
<td width="2.8cm" style="text-align:left;padding-left:2mm">收費(fèi)項(xiàng)</td>
<td width="1.8cm">單價(jià)</td>
<td width="1.5cm">數(shù)量</td>
</tr>
</thead>
<tbody>
<xsl:for-each select="ds/BillItem">
<xsl:variable name="StuClassID" select="StuClassID" ></xsl:variable>
<tr height="0.5cm" style="border-top-width:0.1mm">
<td width="2.8cm" style="text-align:left;text-formatflags:linelimit">
●<xsl:value-of select="ProductName" /><xsl:if test="ProductType = 8 and /ds/Bill/BillTypeID = 1">
<xsl:if test="DealWithState = 0">×</xsl:if>
<xsl:if test="DealWithState = 1">√</xsl:if>
</xsl:if>
</td>
<td width="1.8cm" style="text-formatflags:linelimit;font-size:10">
<xsl:value-of select="String:FormatNumber('{0:c}',UnitPrice)" />
</td>
<td width="1.5cm" align="center">
<xsl:value-of select="Amount" />
</td>
</tr>
<xsl:if test="ProductType = 1 and DealWithState = 1">
<tr height="1.6cm">
<td width="6.1cm" style="font-size:8;text-valign:top;text-align:left;padding-left:4mm;text-formatflags:linelimit">
開(kāi)課時(shí)間:<xsl:value-of select="String:FormatDate('{0:D}',/ds/Class[StuClassID = $StuClassID]/StartDate)" />(<xsl:value-of select="/ds/Class[StuClassID = $StuClassID]/TimeRule" />)<br />地點(diǎn):<xsl:value-of select="/ds/Class[StuClassID = $StuClassID]/SchoolName" />
(<xsl:value-of select="/ds/Class[StuClassID = $StuClassID]/ClassroomName" />)<br />
講師:<xsl:value-of select="/ds/Class[StuClassID = $StuClassID]/TeacherName" />
<br />
第一次上課時(shí)間:<xsl:value-of select="String:FormatDate('{0:yy年M月d日h時(shí)m分}',/ds/LessonDegree/StartDate)" />
<br />
</td>
</tr>
</xsl:if>
</xsl:for-each>
</tbody>
<tfoot>
<tr height="3.5cm" style="border-top-width:0.2mm">
<td width="6.1cm" style="text-align:left">
<xsl:if test="ds/Bill/BillTypeID = 1">優(yōu)惠:</xsl:if><xsl:if test="ds/Bill/BillTypeID = 0">扣除:</xsl:if>
<xsl:value-of select="String:FormatNumber('{0:c}',ds/Bill/Favourable)" /><br />
<xsl:if test="ds/Bill/BillTypeID = 1">實(shí)收:</xsl:if><xsl:if test="ds/Bill/BillTypeID = 0">實(shí)退:</xsl:if>
<xsl:value-of select="String:FormatNumber('{0:c}',ds/Bill/Payed)"/><br />
余額:<xsl:value-of select="String:FormatNumber('{0:c}',ds/Student/AvailableMoney)"/><br />
欠費(fèi):<xsl:value-of select="String:FormatNumber('{0:c}',ds/Student/CreditMoney)"/><br /><br />
簽字或蓋章:
</td>
</tr>
<tr height="1cm">
<td width="6.1cm" style="text-align:left;font-size:9" format="child">
<span x="0" y="0cm">
付款需知:購(gòu)買(mǎi)后概不退款,√表示教材已發(fā),×表示教材未發(fā)。
</span>
</td>
</tr>
<tr height="2cm">
<td width="6.1cm" style="text-align:left;font-size:10" format="child">
<span x="0" y="0cm">
錄入員:<xsl:value-of select="ds/Bill/TrueName" /><br />
收費(fèi)點(diǎn):<xsl:value-of select="ds/Bill/PostSchoolName" /><br />
打印者:<xsl:value-of select="$PrintTrueName" /><br />
打印時(shí)間:<xsl:value-of select="$PrintDateTime" />
</span>
</td>
</tr>
<tr height="3cm">
<td width="5cm" format="child">
<image x="2cm" y="0cm" width="2.8cm" height="2.8cm" twocode="true">
<xsl:value-of select="ds/Bill/BillID" /> </image>
</td>
</tr>
<tr height="0.5cm">
<td width="6cm" format="child">
<line x="0cm" y="0cm" endx="6cm" endy="0cm" style="border:0.1mm; border-style:dot"></line>
</td>
</tr>
</tfoot>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
【關(guān)于麥田】
連云港麥田軟件開(kāi)發(fā)有限公司(原名:連云港市蘇網(wǎng)軟件開(kāi)發(fā)有限公司),坐落在著名的西游記故鄉(xiāng)、水晶之鄉(xiāng)、黃海之濱--江蘇.連云港,是專業(yè)的教育培訓(xùn)管理解決方案提供服務(wù)商,旗下產(chǎn)品--麥田培訓(xùn)學(xué)校管理軟件(原名:蘇網(wǎng)培訓(xùn)學(xué)校管理軟件)是國(guó)內(nèi)最知名使用人數(shù)最多的培訓(xùn)管理軟件之一。
麥田培訓(xùn)學(xué)校管理軟件早期研發(fā)地點(diǎn):江蘇.蘇州,故曾命名為“蘇網(wǎng)”。早期的培訓(xùn)模型主要參考上海、江浙等沿海一帶的培訓(xùn)機(jī)構(gòu)。2008年春,正式企業(yè)化運(yùn)作,不斷采集全國(guó)各大城市及海外華人培訓(xùn)特點(diǎn),各類培訓(xùn)機(jī)構(gòu)管理方式。提煉管理的普遍性,進(jìn)行標(biāo)準(zhǔn)化、通用化。并且研發(fā)各種查詢、報(bào)表、打印、系統(tǒng)提醒、短信編程等元素,實(shí)現(xiàn)企業(yè)的個(gè)性化需求?!溙锱嘤?xùn)學(xué)校管理軟件不僅僅是一款管理類軟件,更是培訓(xùn)管理系統(tǒng)的開(kāi)發(fā)平臺(tái)。MTcnsoft 專業(yè)于教育培訓(xùn)管理的開(kāi)發(fā),擁有資深的培訓(xùn)行業(yè)軟件架構(gòu)師,加上多年的開(kāi)源及運(yùn)作經(jīng)驗(yàn),對(duì)用戶的需求、使用習(xí)慣等理解十分透徹,自從成立公司后,不斷招聘研發(fā)人員,為我們向廣大用戶提供更優(yōu)質(zhì)的服務(wù)和產(chǎn)品有了更大的保障。
麥田培訓(xùn)學(xué)校管理軟件基于C#+Sql Server的技術(shù)開(kāi)發(fā),功能十分強(qiáng)大成熟,實(shí)施成本低。從2006年開(kāi)始發(fā)布第一個(gè)正式版本以來(lái),至今已經(jīng)發(fā)布兩個(gè)系列,多款優(yōu)秀版本。麥田培訓(xùn)學(xué)校管理軟件以簡(jiǎn)單、健壯、靈活、幾大特點(diǎn)深受廣大用戶的青睞。
我們對(duì)產(chǎn)品追求的終極目標(biāo)是:實(shí)用,易用!
擁有麥田,擁有一個(gè)好的未來(lái)!
銷售熱線:181-5125-1101
服務(wù)熱線:0518-85201423