私はリストTaskList
の中GridView1
と右にリストしています 私は労働者リストのhaving different skills under one
serviceCategoryIDを表示しています。GridView1
行とすべてのをクリックすると、ワーカー リストの表示がフィルタリングされWorkers with multiple skills under one serviceCategoryID are Listed in GridView2
ます。
タスクをワーカーに割り当てる前にPendingTasks
、そのワーカーGridView2
の数を表示したいList of Workers with multiple skills under one selected serviceCategoryID from GridView1.
現在の SQL クエリは次のとおりです。
SELECT WorkerMst.workerID, WorkerMst.FName, WorkerMst.LName,WorkerMst.FName +' '+ WorkerMst.LName as Name,WorkerSkills.WorkerSkillsID,
WorkerSkills.WorkerID AS WorkerSkills_WorkerID, WorkerSkills.SkillTypeID AS WorkerSkills_SkillTypeID, WorkerSkills.Score, skillTypeMst.skillTypeID, skillTypeMst.skillType,
serviceCategoryMaster.serviceCategoryMasterID, serviceCategoryMaster.CategoryName, WorkerMst.IsActive AS WorkerMst_IsActive,WorkerMst.IsIndividual,WorkerMst.readyfornewtask,
(select count(WorkerID)from WorkerTask where isAproved=0 and workerid in (select distinct(workerid) from workertask where isaproved=0 group by workerid)) as PendingTsks
FROM WorkerMst
INNER JOIN WorkerSkills ON WorkerMst.workerID = WorkerSkills.WorkerID
INNER JOIN skillTypeMst ON WorkerSkills.SkillTypeID = skillTypeMst.skillTypeID
INNER JOIN serviceCategoryMaster ON skillTypeMst.serviceCategoryMasterID = serviceCategoryMaster.serviceCategoryMasterID
where skillTypeMst.serviceCategoryMasterID=1 and
WorkerMst.workerID in (select distinct(workerid) from workertask where isaproved=0)
order by workermst.workerid
WorkerTask
テーブルには次のフィールドがあります:
WorkerID,TaskMstID,IsAccepted ,IsRejected,OnDate,isAproved
なにか提案を?助けて感謝!前もって感謝します!