"Net-Auction"



Yüklə 310,72 Kb.
səhifə3/4
tarix18.01.2019
ölçüsü310,72 Kb.
#100276
1   2   3   4

TendersBLL:

This class provides Tenders management. All methods works with TendersTableAdapter if it have no different description. Every Product may be attached to only one Tender, so Tender's Serial Number is same with Product's Serial Number. TendersTableAdapter is a cut from two tables: Products & Tenders.

Open Tender means that Clients may make bids (the current Date/Time is after it's Beginning Date/Time and before it's Final Date/Time) ,else it closed.


GetTenderByTenderNumber

Parameters:

Guid SerialNumber

Return:

TendersRow

Description:

Returns TendersRow of Tender&Product with given Serial Number.



GetFullTendersByOwnerID

Parameters:

Guid OwnerID

Return:

TendersDataTable

Description:

Opens and closes Tenders according to the current date/time,

Returns all active Tenders by Owner ID, uses CheckTenderTimes method.





GetTendersByBidderID

Parameters:

Guid BidderID

Return:

TendersDataTable

Description:

Opens and closes Tenders according to the current date/time,

Returns all active Tenders by Bidder ID, uses CheckTenderTimes method.






AddNewTender

Parameters:

Guid ProductID, DateTime BeginDateTime, DateTime FinalDateTime, decimal StartPrice

Return:

bool true if succeeded, false – otherwise.

Description:

Adds new Tender for the Product.




GetFullInfoByTenderNumber

Parameters:

Guid TenderNumber

Return:

TendersRow

Description:

Returns TendersRow of Product which ever had Tender with given Serial Number. The Tenders table's fields may be null.




GetTenderByCategory

Parameters:

string Category

Return:

TendersDataTable

Description:

Returns all TendersRows, by given Category



DeleteByTenderNumber

Parameters:

Guid TenderNumber

Return:

bool true if succeeded, false – otherwise.

Description:

Removes the Tender from Tenders table only.




DeleteNotActiveTenderAndProductByNumber

Parameters:

Guid TenderNumber

Return:

bool true if succeeded, false – otherwise.

Description:

Removes the Tender from Tenders table and related Product from Products Table .



Next method uses ProductsBLL & TagsBLL.

OpenNewTender

Parameters:

Guid ClientID, DateTime BeginDateTime, DateTime FinalDateTime, decimal StartPrice, string Tags, string Category, string Condition,string Title, int NItems, string Location, string Ship, string Description, ref Guid SerialNumber

Return:

int 0 – was successful, -1 - The final date is older than start date, -2 - The final date is over the start date at more than a month, -3 - adding new product failed,-4 - adding new Tender failed

Description:

Adds new Product, inserts it's Tags to the Tags table, creates Tender for this Product and returns result. Not opens Tender.




UpdateTender

Parameters:

Guid SerialNumber, DateTime BeginDateTime, DateTime FinalDateTime, decimal StartPrice, string Category, string Condition, string Title, int NItems, string img, string Location, string Ship, string Description, bool AfterTender

Return:

int 0 – was successful, -1 - The final date is older than start date, -3 - adding new product failed

Description:

Updates existing Product in Products table & related Tender in Tenders table.


Next method uses ProductsBLL

AddImageToTender

Parameters:

Guid SerialNumber, string ImagePath

Return:

None

Description:

Uses ProductsBLL.UpdateImagePath method for updating Image Path



CheckTendersTimes

Parameters:

string Category

Return:

None

Description:

Opens & closes all Tenders, according to current Date/Time,by

Category.






CheckTendersTimes

Parameters:

Guid TenderNumber

Return:

None

Description:

Opens & closes all Tenders, according to current Date/Time,by

TenderNumber.




Next method uses BidsPerTenderBLL ,Bidding, ProductsBLL, TagsBLL

OnTenderTimeout

Parameters:

Guid TenderNumber

Return:

None

Description:

GetsCurrentTenderWinners, Update tables:

  1. Deletes all bids of current tender.

  2. Puts all users into the history

and Updates Buyers-Sellers Table.

  1. Removes tender from tenders table.

4. Updates product table.




OnTenderStartTime

Parameters:

Guid TenderNumber

Return:

None

Description:

Sets related Product's field active = true, afterTender = false,


TagsBLL:

This class provides Tags for product's searching process managment. All methods works with TagsVSProductsTableAdapter if it has no different description .




AddTags

Parameters:

Guid SerialNumber, string tags, bool IsTitleTags, string category

Return:

int number of inserted tags

Description:

Splits the tags string with " " token and inserts it to the Tags table




ProductTagPresent

Parameters:

Guid SerialNumber, string s

Return:

TagsVSProductsRow

Description:

Returns TagsVSProductsRow with such Product's Serial Number & Tag equals to string s.




UpdateTag

Parameters:

Guid SerialNumber, string tag, bool IsTitleTag, string Category

Return:

bool true if succeeded, false – otherwise.

Description:

Updates TagsVSProductsRow




DeleteTagsBySerialNumber

Parameters:

Guid SerialNumber

Return:

int number of deleted tags

Description:

Deletes all tags (TagsVSProductsRow)by Product's Serial Number from Tags table.




GetAllTags

Parameters:

None

Return:

TagsVSProductsDataTable

Description:

Returns all tags.




GetProductsByTag

Parameters:

string tag

Return:

TagsVSProductsDataTable

Description:

Returns all records with such tag.




GetProductsByTagAndCategory

Parameters:

string category, string tag

Return:

TagsVSProductsDataTable

Description:

Returns all records with such tag & category.



CategoriesBLL:

This class provides Tenders management. All methods works with CategoriesTableAdapter if it have no different description.




CategoriesList

Parameters:

None

Return:

CategoriesDataTable

Description:

Return all categories



CategoriesUseableList

Parameters:

None

Return:

CategoriesDataTable

Description:

Return all usable categories (except "All Categories").



SellerVSBuyerBLL:

This class provides SellerVSBuyer relations management. All methods works with SellersVSBuyersTableAdapter if it have no different description.





IsRelated

Parameters:

Guid FirstID, Guid SecondID

Return:

bool

Description:

Checks existence of buyer-seller relationship

betwin two given ID's.If FirstID == SecondID returns false. The order of Parameters is not important






IsRelationshipExists

Parameters:

Guid SellerID, Guid BuyerID

Return:

bool

Description:

Checks existence of buyer-seller relationship

betwin two given ID's.If FirstID == SecondID returns false. The order of Parameters is important.






AddSellerVSBuyerRelationship

Parameters:

Guid SellerID, Guid BuyerID

Return:

bool true if succeeded, false – otherwise.

Description:

Adds the row to the database




SetVoted

Parameters:

string SellerID, string BuyerID, bool IsVoted

Return:

bool true if succeeded, false – otherwise.

Description:

Sets the Voted parameter, voted == true means, that the Seller has been rated although.



IsVoted

Parameters:

string SellerID, string BuyerID

Return:

bool

Description:

Checks the Voted parameter



BidsPerTenderBLL:

This class provides Bids for existent Tender management. All methods works with BidsPerTenderTableAdapter if it have no different description.





AddBid

Parameters:

Guid ClientID, decimal Bid, Guid TenderNumber, int Quantity(needed quantity), bool QuantityBound (true, where potential buyer can't buy less then declared).

Return:

bool true if succeeded, false – otherwise.

Description:

Adds new bid to the Tender.




UpdateBid

Parameters:

Guid ClientID, decimal Bid, Guid TenderNumber, int Quantity, bool QuantityBound

Return:

bool true if succeeded, false – otherwise.

Description:

Updates the last bid for given Client & Tender




GetBidsByTenderNumber

Parameters:

string TenderNumber

Return:

BidsPerTenderDataTable

Description:

Returns all bids by Tender number.




GetBidsByTenderNumberByDesc

Parameters:

string TenderNumber

Return:

BidsPerTenderDataTable

Description:

Returns all bids by Tender number in descending order by bid.




DeleteByTenderNumber

Parameters:

string TenderNumber

Return:

int number deleted rows.

Description:

Returns all bids by Tender number in descending order by bid.


FeedbacksBLL:

This class provides Feedbacks management. All methods works with FeedbacksVSClientsDataTable if it have no different description. All Feedbacks are related to two Clients Author & Target.




GetFeedbacks

Parameters:

Guid TargetID

Return:

FeedbacksVSClientsDataTable

Description:

Returns all feedbacks, are given to the target (Client).


AddFeedback

Parameters:

Guid AuthorID, Guid TargetID, string Text

Return:

None

Description:

Adds Feedback to the database.



Yüklə 310,72 Kb.

Dostları ilə paylaş:
1   2   3   4




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin