public void GetStatusByCompID(int CompID) { var svBuylead = new BuyleadService(); string sqlwhere = svBuylead.CreateWhereAction(BuyleadAction.Junk, CompID); var CountJunk = svBuylead.CountData <b2bBuylead>("BuyleadID", sqlwhere); ViewBag.CountJunk = CountJunk; sqlwhere = svBuylead.CreateWhereAction(BuyleadAction.BackEnd, CompID) + " AND ListNo = 0 "; var CountBuylead = svBuylead.CountData <b2bBuylead>("BuyleadID", sqlwhere); ViewBag.CountBuylead = CountBuylead; sqlwhere = svBuylead.CreateWhereAction(BuyleadAction.All, CompID); var CountAllitem = svBuylead.CountData <b2bBuylead>("BuyleadID", sqlwhere); ViewBag.CountAllitem = CountAllitem; sqlwhere += svBuylead.CreateWhereCause(0, "", 4); var CountBuyleadApprove = svBuylead.CountData <view_BuyLead>("BuyleadID", sqlwhere); ViewBag.CountBuyleadApprove = CountBuyleadApprove; }