public bool UpdateAssetDetails(int AssetDetailsId, BUSSINESS_ENTITIES.AssetmasterEntities AssetDetailEntities)
        {
            var success = false;

            if (AssetDetailEntities != null)
            {
                //using (var scope = new TransactionScope())
                //{
                var ASSETDetail = _UOW.ASSET_MASTERRepository.GetByID(AssetDetailsId);
                if (ASSETDetail != null)
                {
                    if (AssetDetailEntities.ASSETTYPE_ID != null)
                    {
                        ASSETDetail.ASSETTYPE_ID = AssetDetailEntities.ASSETTYPE_ID;
                    }
                    if (AssetDetailEntities.ASSET_NAME != null && AssetDetailEntities.ASSET_NAME != "")
                    {
                        ASSETDetail.ASSET_NAME = AssetDetailEntities.ASSET_NAME;
                    }
                    if (AssetDetailEntities.ASSETCODE != null && AssetDetailEntities.ASSETCODE != "")
                    {
                        ASSETDetail.ASSETCODE = AssetDetailEntities.ASSETCODE;
                    }
                    _UOW.ASSET_MASTERRepository.Update(ASSETDetail);
                    _UOW.Save();
                    //scope.Complete();
                    success = true;
                    //}
                }
            }
            return(success);
        }
 public int CreateAssetDetails(BUSSINESS_ENTITIES.AssetmasterEntities AssetDetailEntities)
 {
     if (AssetDetailEntities != null)
     {
         var ASSETDetail = new TBL_HRMS_ASSET_MASTER
         {
             ASSETTYPE_ID = AssetDetailEntities.ASSETTYPE_ID,
             ASSET_NAME   = AssetDetailEntities.ASSET_NAME,
             ASSETCODE    = AssetDetailEntities.ASSETCODE,
         };
         _UOW.ASSET_MASTERRepository.Insert(ASSETDetail);
         _UOW.Save();
     }
     return(Convert.ToInt32(AssetDetailEntities.ID));
 }