/// <summary>
        /// Get Action for Create
        /// </summary>
        /// <returns></returns>
        public ActionResult Create()
        {
            VendorRegistration vendorRegister = new VendorRegistration();
            var ven = from v in unitOfWork.VendorRepository.Get() select v;

            //vendorRegister.DomainItems = ExtensionClass.GetDomains();
            vendorRegister.DomainLists = ExtensionClass.GetDomains();

            vendorRegister.CountryItems   = ExtensionClass.GetCountries();
            vendorRegister.StateItems     = ExtensionClass.GetStates();
            vendorRegister.CityItems      = ExtensionClass.GetCities();
            vendorRegister.AcademicsItems = ExtensionClass.GetAcademics();

            List <VendorLanguagePair> LanguagePairList = new List <VendorLanguagePair> {
                ExtensionClass.GetLanguagePair()
            };

            vendorRegister.VendorLanguagePair = LanguagePairList;
            List <VendorSoftware> SoftwareList = new List <VendorSoftware> {
                ExtensionClass.GetSoftware()
            };

            vendorRegister.VendorSoftware = SoftwareList;
            List <VendorService> ServicesList = new List <VendorService> {
                ExtensionClass.GetServices()
            };

            vendorRegister.VendorService = ServicesList;

            return(View(vendorRegister));
        }
        public static VendorService GetServices()
        {
            //logic for drop down list Language
            //improve this code ....to directly get the data in the list Format

            var serviceList = from service in unitOfWork.M_ServicesRepository.Get() select service;

            var serviceL = new List <TBL_M_Services>();


            if (serviceList.Any())
            {
                foreach (var d in serviceList)
                {
                    serviceL.Add(new TBL_M_Services()
                    {
                        ServicesID = d.ServicesID, Services = d.Services
                    });
                }
            }

            var currencyList = from currency in unitOfWork.M_CurrencyRepository.Get() select currency;

            var currencyQuotedL  = new List <VendorService>();
            var currencyFreezedL = new List <VendorService>();

            if (currencyList.Any())
            {
                foreach (var d in currencyList)
                {
                    currencyQuotedL.Add(new VendorService()
                    {
                        QuotedCurrencyID = d.CurrencyID, QuotedCurrency = d.Currency
                    });
                    currencyFreezedL.Add(new VendorService()
                    {
                        FreezedCurrenyID = d.CurrencyID, FreezedCurreny = d.Currency
                    });
                }
            }
            VendorService vendorService = new VendorService
            {
                QuotedRate           = 0,
                FreezedRate          = 0,
                ServicesItems        = ExtensionClass.ToSelectListItems <TBL_M_Services>(serviceL, x => x.Services, x => x.ServicesID.ToString()),
                QuotedCurrencyItems  = ExtensionClass.ToSelectListItems <VendorService>(currencyQuotedL, x => x.QuotedCurrency, x => x.QuotedCurrencyID.ToString()),
                FreezedCurrencyItems = ExtensionClass.ToSelectListItems <VendorService>(currencyFreezedL, x => x.FreezedCurreny, x => x.FreezedCurrenyID.ToString()),
            };

            return(vendorService);
        }
        public static VendorSoftware GetSoftware()
        {
            //logic for drop down list Softwares Names and Expertise
            //improve this code ....to directly get the data in the list Format
            var softwareList = from software in unitOfWork.M_SoftwareRepository.Get() select software;

            var softwareL = new List <VendorSoftware>();

            if (softwareList.Any())
            {
                foreach (var d in softwareList)
                {
                    softwareL.Add(new VendorSoftware()
                    {
                        SoftwareID = d.SoftwareID, Software = d.Software
                    });
                }
            }

            var expertiseList = from expertise in unitOfWork.M_ExpertiseRepository.Get() select expertise;

            var expertiseL = new List <TBL_M_Expertise>();

            if (expertiseList.Any())
            {
                foreach (var d in expertiseList)
                {
                    expertiseL.Add(new TBL_M_Expertise()
                    {
                        ExpertiseID = d.ExpertiseID, Expertise = d.Expertise
                    });
                }
            }
            //creating the list of blank software pair..to be displayed as default
            VendorSoftware VendorSoftware = new VendorSoftware
            {
                Version        = "0",
                SoftwaresItems = ExtensionClass.ToSelectListItems <VendorSoftware>(softwareL, x => x.Software, x => x.SoftwareID.ToString()),
                ExpertiseItems = ExtensionClass.ToSelectListItems <TBL_M_Expertise>(expertiseL, x => x.Expertise, x => x.ExpertiseID.ToString()),
            };

            return(VendorSoftware);
        }
        public static IEnumerable <SelectListItem> GetAcademics()
        {
            //logic for drop down list Academics
            //improve this code ....to directly get the data in the list Format
            var academicsList = from academics in unitOfWork.M_AcademicsRepository.Get() select academics;
            var academicsL    = new List <TBL_M_Academics>();

            if (academicsList.Any())
            {
                foreach (var d in academicsList)
                {
                    academicsL.Add(new TBL_M_Academics()
                    {
                        AcademicsID = d.AcademicsID, Academics = d.Academics
                    });
                }
            }

            return(ExtensionClass.ToSelectListItems <TBL_M_Academics>(academicsL, x => x.Academics, x => x.AcademicsID.ToString()));
        }
        public static IEnumerable <SelectListItem> GetCountries()
        {
            //logic for drop down list Country
            //improve this code ....to directly get the data in the list Format
            var countryList = from country in unitOfWork.M_CountryRepository.Get() select country;
            var countryL    = new List <cCountry>();

            if (countryList.Any())
            {
                foreach (var d in countryList)
                {
                    countryL.Add(new cCountry()
                    {
                        CountryID = d.CountryID, Country = d.Country
                    });
                }
            }

            IEnumerable <cCountry> _Country_IE = countryL as IEnumerable <cCountry>;

            return(ExtensionClass.ToSelectListItems <cCountry>(countryL, x => x.Country, x => x.CountryID.ToString()));
        }
        public static IEnumerable <SelectListItem> GetStates()
        {
            //logic for drop down list State
            //improve this code ....to directly get the data in the list Format
            var stateList = from state in unitOfWork.M_StateRepository.Get() select state;
            var stateL    = new List <cState>();

            if (stateList.Any())
            {
                foreach (var d in stateList)
                {
                    stateL.Add(new cState()
                    {
                        StateID = d.StateID, State = d.State
                    });
                }
            }

            IEnumerable <cState> _State_IE = stateL as IEnumerable <cState>;

            return(ExtensionClass.ToSelectListItems <cState>(stateL, x => x.State, x => x.StateID.ToString()));
        }
        public static VendorLanguagePair GetLanguagePair()
        {
            //logic for drop down list Language
            //improve this code ....to directly get the data in the list Format

            var languageList = from language in unitOfWork.M_LanguageRepository.Get() select language;

            var languageSourceL = new List <VendorLanguagePair>();
            var languageTargetL = new List <VendorLanguagePair>();

            if (languageList.Any())
            {
                foreach (var d in languageList)
                {
                    languageSourceL.Add(new VendorLanguagePair()
                    {
                        SourceLanguageID = d.LanguageID, SourceLanguage = d.Language
                    });
                    languageTargetL.Add(new VendorLanguagePair()
                    {
                        TargetLanguageID = d.LanguageID, TargetLanguage = d.Language
                    });
                }
            }


            VendorLanguagePair LanguagePair = new VendorLanguagePair
            {
                SourceLanguageID    = 0,
                TargetLanguageID    = 0,
                LanguageSourceItems = ExtensionClass.ToSelectListItems <VendorLanguagePair>(languageSourceL, x => x.SourceLanguage, x => x.SourceLanguageID.ToString()),
                LanguageTargetItems = ExtensionClass.ToSelectListItems <VendorLanguagePair>(languageTargetL, x => x.TargetLanguage, x => x.TargetLanguageID.ToString()),
            };

            return(LanguagePair);
        }
 //returns the Partial View to AddVendorServices dynamically
 public ActionResult AddVendorServices()
 {
     return(PartialView("AddVendorServices", ExtensionClass.GetServices()));
 }
 //returns the Partial View to AddVendorSoftwares dynamically
 public ActionResult AddVendorSoftwares()
 {
     return(PartialView("AddVendorSoftwares", ExtensionClass.GetSoftware()));
 }
 //returns the Partial View to Add language pair dynamically
 public ActionResult AddLanguagePair()
 {
     return(PartialView("AddLanguagePair", ExtensionClass.GetLanguagePair()));
 }