public List <AssetDetails> GetAssetListByEmpcode(string code)
        {
            List <AssetDetails> assetlist = new List <AssetDetails>();
            List <Assets>       assets    = _repo.GetAllAsset();

            foreach (Assets asset in assets)
            {
                string[] empId = asset.ReassignedTo.Split(':');
                if (empId[0] == code && asset.AssetStatus == Status.Pending)
                {
                    List <AssetDetails> assetdetail = _assetRepo.GetMyEmployeeAsset(asset.EmployeeCode);
                    foreach (var assetd in assetdetail)
                    {
                        if (assetd.AssetCode == asset.AssetCode)
                        {
                            assetd.ReAssignedTo = asset.ReassignedTo;
                            assetd.AssetId      = asset.AssetId;
                            assetlist.Add(assetd);
                        }
                    }
                }
            }
            return(assetlist);
        }
Beispiel #2
0
 public List <Assets> Getasset()
 {
     return(_assetrepo.GetAllAsset());
 }