public static BaseCompanyModel ToBaseCompany(this Company company)
        {
            BaseCompanyModel _result = new BaseCompanyModel();

            _result.Id                = company.Id;
            _result.CompanyName       = company.CompanyName;
            _result.Address           = company.Address;
            _result.Phone             = company.Phone;
            _result.Mobile            = company.Mobile;
            _result.Email             = company.Email;
            _result.Web               = company.Web;
            _result.Country           = company.Country;
            _result.State             = company.State;
            _result.Pin               = company.Pin;
            _result.FinancialYearFrom = company.FinancialYearFrom;
            _result.BooksBeginingFrom = company.BooksBeginingFrom;
            _result.TIN               = company.TIN;
            _result.CST               = company.CST;
            _result.PAN               = company.PAN;
            _result.CurrentDate       = company.CurrentDate;
            _result.Logo              = company.Logo;
            _result.CurrencyId        = company.CurrencyId;
            _result.CreatedDate       = company.CreatedDate;
            _result.ModifiedDate      = company.ModifiedDate;
            return(_result);
        }
        public static Company ToCompany(this BaseCompanyModel company)
        {
            Company _result = new Company();

            if (company.Id.HasValue)
            {
                _result.Id = company.Id.GetValueOrDefault();
            }
            _result.CompanyName       = company.CompanyName;
            _result.Address           = company.Address;
            _result.Phone             = company.Phone;
            _result.Mobile            = company.Mobile;
            _result.Email             = company.Email;
            _result.Web               = company.Web;
            _result.Country           = company.Country;
            _result.State             = company.State;
            _result.Pin               = company.Pin;
            _result.FinancialYearFrom = company.FinancialYearFrom;
            _result.BooksBeginingFrom = company.BooksBeginingFrom;
            _result.TIN               = company.TIN;
            _result.CST               = company.CST;
            _result.PAN               = company.PAN;
            _result.CurrentDate       = company.CurrentDate;
            _result.Logo              = company.Logo;
            _result.CurrencyId        = company.CurrencyId;
            _result.CreatedDate       = company.CreatedDate;
            _result.ModifiedDate      = company.ModifiedDate;
            return(_result);
        }