public int CreateAssetType(BUSSINESS_ENTITIES.AssetTypeEntities AssetDetailEntities)
 {
     if (AssetDetailEntities != null)
     {
         var ASSETDetail = new TBL_HRMS_ASSETTYPE_MASTER
         {
             ASSETTYPE_NAME = AssetDetailEntities.ASSETTYPE_NAME,
         };
         _UOW.ASSETTYPE_MASTERRepository.Insert(ASSETDetail);
         _UOW.Save();
     }
     return(Convert.ToInt32(AssetDetailEntities.ID));
 }
        public bool UpdateAssetType(int AssetDetailsId, BUSSINESS_ENTITIES.AssetTypeEntities AssetDetailEntities)
        {
            var success = false;

            if (AssetDetailEntities != null)
            {
                //using (var scope = new TransactionScope())
                //{
                var ASSETDetail = _UOW.ASSETTYPE_MASTERRepository.GetByID(AssetDetailsId);
                if (ASSETDetail != null)
                {
                    if (AssetDetailEntities.ASSETTYPE_NAME != null && AssetDetailEntities.ASSETTYPE_NAME != "")
                    {
                        ASSETDetail.ASSETTYPE_NAME = AssetDetailEntities.ASSETTYPE_NAME;
                    }

                    _UOW.ASSETTYPE_MASTERRepository.Update(ASSETDetail);
                    _UOW.Save();
                    //scope.Complete();
                    success = true;
                }
            }
            return(success);
        }