it’s better to call this problem as puzzle. Problem is
I allocating a number of batch to a Third Party. At time of Registration That party telling me how many batch it Wants . now third party can allocate that batch’s to its operators.
at any order.How can i allocate unique string to every operator..
i know its confusing then lets have a example.
A do the Registration and ask For 15 Batch’s.I give him 15 Batch Limit.at allocation time
i allocating Batch’s Like A1,A2…till A15(Limit of that User).
SO i bind That With Drop Down List.So user Can Select a Single Record From There.
NOw what User Did .he Select A1 for one Batch and for next Batch He Selects A10.So these batch must not be shown in DDl.
Next time i need to Show only those batch which is not allocated within Limit.
To get the Difference i written a query like this
Select NumOfDataEntryOper -
(select isnull(COUNT([BatchID]),0) as 'Avaiable Allocation' from TBL_iBATCH
where iRegFormID = @iRegFormID and ([isBatchClosed]=0 Or [Cancelled]=1))
From TBL_iREGFORM
Where
iRegFormID=@iRegFormID
And
MailID=@Mailid
This will give me remaing Batch Count.But how to do the Allocation
Let me tell you how I would implement this :
When a user starts a batch from a DDL you should update your table with batches available for user. Then you just do a select from your table and get all left batches..