样例程序说明.docx
《样例程序说明.docx》由会员分享,可在线阅读,更多相关《样例程序说明.docx(13页珍藏版)》请在冰豆网上搜索。
![样例程序说明.docx](https://file1.bdocx.com/fileroot1/2022-12/1/83f1e787-9679-4922-b833-2e4d92bf8b33/83f1e787-9679-4922-b833-2e4d92bf8b331.gif)
样例程序说明
XXX
XXXSystem
ProgramSpecification
-
V1.0
Project
XXXSystem
Document
ProgramSpecification
Version
1.0
Author
Date
Supervisor
Date
TableofContents
TableofContents2
1.Introduction3
1.1BusinessContext3
1.2SystemOverview3
1.3ManualReader3
2.ProgramArchitecture4
2.1ArchitectureDiagram4
2.2Technologies5
3.ClassDiagram6
3.1WebLayer6
3.2BusinessFacadeLayer9
3.3DataAccessLayer12
3.4SystemFramework14
3.5WebService14
4.ClassDescription15
5.JavascriptDescription16
6.WebService17
6.1Requirement17
6.2WebServiceLayer17
6.2.1XXX.WebService\XXX.asmx.cs17
6.3WebServiceBusinessFacadeLayer18
6.3.1XXX.BusinessFacade\WebServiceManagement.cs18
6.4CommonFunctionsCalledByWebService20
6.4.1XXX.BusinessFacade\LoginManagement.cs20
6.4.2XXX.BusinessFacade\ImportData.cs20
6.4.3XXX.DataAccess\PublishLogAccess.cs20
6.4.4XXX.DataAccess\WebServiceDataAccess.cs21
7.ProgramFiles22
8.ThirdPartyLibrary23
9.ActionTypeofActivityLog24
1.Introduction
1.1BusinessContext
InXXX,purchaseprocedures,systemsandorganizationsarecurrentlyheterogeneous.Consequently,itisverydifficulttogatherinformationfromallprojects(suppliers,purchases,volumes)andassesssuppliers.
Asaresult,thepurchasingdepartmentofXXXisaimingtodeployareportingsystemwiththemainobjectiveofgatheringinformationfromsubsidiariesinYYYinordertodeterminehowpurchasescanbeoptimized.
AnITsystemcalledXXXisdevelopedtostoreandmanagereportingdata.
1.2SystemOverview
XXXcontainsadatabasestoringpurchaserelateddata.
Fundamentalfunctionsincludethefollowingones:
∙Dataentry:
someInputReportsinpre-definedformatsaresubmittedtothesystem(quarterlypurchasedatacomingfromeachproject)byusersfromdifferentcountries.
∙Datastorage:
Thedataisstoredandprocessedinthesystem
∙Reportgeneration:
Thesystemproducessomeon-demandOutputReportsfromconsolidateddatacontainedinthedatabase
1.3ManualReader
ThisdocumentistheprogramspecificationforXXXITAdministratorwhowillberesponsibleforsupportingXXXendusers,managingXXXservers,andcontactingXXXvendor.
2.ProgramArchitecture
Inthissection,itshowstheXXXprogrammingstructureandrelatedtechnologies.
2.1ArchitectureDiagram
●TheWeblayerprovidesaccessforclientstotheapplication.TheWeblayerconsistsofASP.NETWebFormsandcode-behindfiles.TheWebFormssimplyprovidetheuserexperienceinHTML,whilethecode-behindfilesimplementeventhandlingforthevariouscontrols.
●TheBusinessFacadelayerservesasanisolationlayer,segregatingtheuserinterfacefromtheimplementationofthevariousbusinessfunctions.Apartfromlow-levelsystemandsupportfunctions,allcallstodatabaseserversaremadethroughthisassembly.
●TheDataAccesslayerprovidesdataservicestotheBusinessRuleslayer.
2.2Technologies
WebLayer
BusinessFacadeLayer
DataAccessLayer
MainTechnology
HTTP/HTTPS,D/HTML,ASPX,Javascript,CSS,AJAX
SecurityControl(ACL),Action,Compositequery
SQLserverDatabase
DesignPattern
Factory,Delegate
Composite,Command,Adapter,Factory
ADO.Net,Factory,Singleton
Development
◆UsingHTML+ASPX+Code-behind
◆Usinghtml/aspxasviewformat,withCSStocontrolthelookandfeel
◆Usingjavascriptforclientsidevalidations
◆UsingAJAXnon-refreshtechnologyforbetteruserinterfaceexperience
◆Objectmodelingwithsuitabledesignpatterntocallbusinessobjects
◆Thebusinessoperationwillbeencapsulatedinobjectswithpublicinterfaceforexternalusage.
◆Theobjectmodificationinthislayerdoesnotaffecttheothertwolayers.
◆Thereuseoftheexistingobjectsspeedsupimplementationofnewfunctions.
◆UsageofConnectionPooltoimprovetheefficiency.
3.ClassDiagram
Inthissection,itshowsthemainclassesinthesystem.
3.1WebLayer
3.2BusinessFacadeLayer
3.3DataAccessLayer
3.4SystemFramework
3.5WebService
4.ClassDescription
Inthissection,itgivesthedetaildescriptionsofclassesandtheirfunctions.
Pleaserefertotheappendix“XXXclasslibrary.chm”.
5.JavascriptDescription
Inthissection,itshowsthewholemapofjavascriptfunctionsinthesystem.
Pleaserefersto“XXXJavascript.xls”.
6.WebService
Inthissection,itshowsthewholemapofwebserviceclasseswiththeirfunctions.
6.1Requirement
Thedevelopercanusedifferentdevelopmentlanguagelike.Net,Java,PHP,…todeveloptheWebServiceClient,andtheprotocolshouldbebasedonSOAP1.2orabove.
6.2WebServiceLayer
6.2.1XXX.WebService\XXX.asmx.cs
1)publicbyte[]ExportData(stringuserName,stringuserPwd,stringfileFormat,stringfileType,stringlanguageCode,outstringfileName,outstringmessage)
ExportpurchaseclassificationstructuralorinputreporttemplatefilesfromXXXtolocalpurchasesystem.
UsernametoaccesstheWebService
UserpasswordtoaccesstheWebService
"XML"or"EXCEL"
Exportfiletype:
"1"forpurchaseclassificationstructuralfiles,"2"forinputreporttemplatefiles
Whichlanguageofthefileasked.ThelanguagecodedefinedinXXX
Theexportedfilename,whichisthefilenamestoredinXXX./param>
Describestheexportfailurereason.Iftheexportissuccess,nothinginmessage.IftheexportDataResultgotNull,checkthemessageheretoseethereason.
Thefilecontentinbinaryarray.
2)publicboolImportData(stringuserName,stringuserPwd,stringreportName,stringreportLevel,stringservice,stringperiod,byte[]fileBuffer,stringfileName,outstringerrCode,outstring[]errList)
ImportinputreportpurchasedatafilefromlocalpurchasesystemtoXXX.
UsernametoaccesstheWebService
UserpasswordtoaccesstheWebService
Inputreportname.Normally,itistheinputreportgeographyname
Inputreportgeographylevel:
"Z","C"or"P"
Theinputreportservicename.Thisisonlytakeneffectwhentheinputreportisatprojectlevel
Theinputreportperiod,format:
YYYYMM
Theinputreportcontentinbinary
Theimportfilename,shouldbeXMLorExcelformat.
Feedbackerrorcode
Theerrorinformationlistfound.Whenimport,thesystemwilltrytofindoutasmanyaserrorstofeedbacktothelocalpurchasesystem.
True:
Importsuccess;False:
Importfailure.
6.3WebServiceBusinessFacadeLayer
6.3.1XXX.BusinessFacade\WebServiceManagement.cs
1)privateboolConvertStrToPeriod(stringstrPeriod,outPeriodEntityperiod,outstringmessage)
ConvertstheperiodinstringformattoaPeriodEntity.
Theperiodinstringformat.
Theperiodentity.
Themessagecode.
True,iftheconvertingissuccessful;otherwise,false.
2)publicboolCheckInputReportStatus(Databasedb,int?
userId,stringreportLevel,stringreportName,stringservice,PeriodEntityperiod,outint?
inputId,outstringmessageCode)
Checkstheinputreportstatus.
Thedatabaseobject.
Theuserid.
Thereportlevel.
Nameofthereport.
Theservicename.
Theperiod.
TheinputreportidinXXX.
Themessagecode.
True,iftheinputreportinformationiscorrect;otherwise,false.
3)publicboolCheckUserLogin(Databasedb,stringuserName,stringuserPass,outint?
userId,outstringmessage)
Checkswhethertheuseraccountandpasswordprovidesarecorrect.
Thedatabaseobject.
Theuserloginname.
Theuserpassword.
TheuseridinXXX.
Themessagecode.
True,iftheloginissuccessful;otherwise,false.
4)publicbyte[]ExportClassificationStructure(stringfileformat,stringlanguageCode,outstringfileName,outstringmessageCode)
Exportsthepurchaseclassificationstructuralfiles.
Thefileformat:
Excel/XML
Thefilelanguagecode.
Thefilename.
Themessagecode.
Thefilecontentinbytearray.
5)publicbyte[]ExportInputReportTemplate(stringfileformat,stringlanguageCode,outstringfileName,outstringmessageCode)
Exportstheinputreporttemplatefiles.
Thefileformat:
Excel/XML
Thefilelanguagecode.
Thefilename.
Themessagecode.
Thefilecontentinbytearray.
6)publicboolImportReportDataTemplate(stringuserName,stringuserPwd,stringfileName,stri