public TenantCompanyDto GetCompanyInfo()
 {
     try
     {
         var reginfo = _TenantProfile.FirstOrDefault(x => x.TenantId == AbpSession.TenantId);
         TenantCompanyDto retinfo = null;
         if (reginfo != null)
         {
             retinfo = new TenantCompanyDto()
             {
                 TenantId              = reginfo.TenantId,
                 address               = reginfo.Address,
                 cellNumber            = reginfo.CellNumber,
                 phoneNumber           = reginfo.PhoneNumber,
                 city                  = reginfo.City,
                 companyName           = reginfo.CompanyName,
                 companyRegistrationNo = reginfo.CompanyRegistrationNo,
                 companyVatNo          = reginfo.CompanyVatNo,
                 country               = reginfo.CountryCode,
                 countryName           = reginfo.CountryCode != null?_couRepository.FirstOrDefault(x => x.Code == reginfo.CountryCode).Country : "",
                 currency              = reginfo.CurrencyCode,
                 currencyName          = reginfo.CurrencyCode != null?_currRepository.FirstOrDefault(x => x.CurrencyCode == reginfo.CurrencyCode).CountryAndCurrency : "",
                 faximileeNumber       = reginfo.FaximileeNumber,
                 invoicingInstruction  = reginfo.InvoicingInstruction,
                 timezone              = reginfo.Timezone,
                 VatorTax              = reginfo.VatorTax
             };
         }
         return(retinfo);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public async Task UpdateTenantCompany(TenantCompanyDto reginfo)
        {
            var current = await _TenantProfile.FirstOrDefaultAsync(x => x.TenantId == AbpSession.TenantId);

            if (current != null)
            {
                current.TenantId              = reginfo.TenantId;
                current.Address               = reginfo.address;
                current.PhoneNumber           = reginfo.phoneNumber.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "");
                current.CellNumber            = reginfo.cellNumber.Replace("(", "").Replace(")", "").Replace("-", "").Replace(" ", "");
                current.City                  = reginfo.city;
                current.CompanyName           = reginfo.companyName;
                current.CompanyRegistrationNo = reginfo.companyRegistrationNo;
                current.CompanyVatNo          = reginfo.companyVatNo;
                current.CountryCode           = reginfo.country;
                current.FaximileeNumber       = reginfo.faximileeNumber;
                current.InvoicingInstruction  = reginfo.invoicingInstruction;
                current.Timezone              = reginfo.timezone;
                current.CurrencyCode          = reginfo.currency;
                current.VatorTax              = reginfo.VatorTax;
                await _TenantProfile.UpdateAsync(current);
            }
        }