/// <summary>
        /// Return account information from vwAccounts based on either 'pims' account or 'original' account number
        /// </summary>
        /// <param name="accountNumber"></param>
        /// <param name="searchType">'pims' or 'origina'</param>
        /// <returns></returns>
        /// 
        public vwAccount GetAccount(string accountNumber, string searchType)
        {
            vwAccount account = null;
            vwAccountRepository data = null;

            try
            {
                data = new vwAccountRepository();
                if (searchType.ToLower() == "pims")
                    account = data.Get(record => record.ACCOUNT == accountNumber);
                else
                    account = data.Get(record => record.OriginalAccount == accountNumber);
            }
            catch (Exception ex)
            {
                throw new Exception("Exception in DataQueries.GetAccount for id=" + accountNumber + " and type = " + searchType + "\n Message:" + ex.Message);
            }
            return account;
        }
        public JsonResult Search(MSI_MediaForm _mediaform)
        {
            vwAccount mediaFormData = null;
            vwAccountRepository viewRepository = null;
            try
            {
                viewRepository = new vwAccountRepository();
                if (_mediaform.PIMSAcct != null)
                {
                    mediaFormData = viewRepository.Get(x => x.ACCOUNT == _mediaform.PIMSAcct);

                }
                else
                {
                    mediaFormData = viewRepository.Get(x => x.OriginalAccount == _mediaform.OrigAcct);
                }

                //Filled data obtained from the Database
                _mediaform.AcctName = mediaFormData.NAME;
                _mediaform.CompanyRequesting = mediaFormData.RESPONSIBILITY;
                _mediaform.Portfolio = mediaFormData.Portfolio;
                _mediaform.PIMSAcct = mediaFormData.ACCOUNT;
                _mediaform.OrigAcct = mediaFormData.OriginalAccount;
                _mediaform.Seller = mediaFormData.Seller;
                _mediaform.OriginalLender = mediaFormData.Originator;
                _mediaform.SSN = mediaFormData.SSN;
                _mediaform.OpenDate = mediaFormData.OpenDate;
                _mediaform.CODate = mediaFormData.ChargeOffDate;
                _mediaform.OrderNumber = RandomGen2.Next().ToString();
                _mediaform.GUID = System.Guid.NewGuid().ToString();

            }
            catch (Exception ex)
            {
            }
            //return the Json Object
            return Json(_mediaform, JsonRequestBehavior.AllowGet);
        }
        public JsonResult Search(MSI_DPSForm _dpsform)
        {
            vwAccount dpsFormData = null;
            vwAccountRepository viewRepository = null;
            try
            {
                viewRepository = new vwAccountRepository();
                if (_dpsform.PIMSAcct != null)
                {
                    dpsFormData = viewRepository.Get(x => x.ACCOUNT == _dpsform.PIMSAcct);

                }
                else
                {
                    dpsFormData = viewRepository.Get(x => x.OriginalAccount == _dpsform.OriginalAcct);
                }
                //Filled data obtained from the Database
                _dpsform.AcctName = dpsFormData.NAME;
                _dpsform.CurrentResp = dpsFormData.RESPONSIBILITY;
                _dpsform.Portfolio = dpsFormData.Portfolio;
                _dpsform.PIMSAcct = dpsFormData.ACCOUNT;
                _dpsform.OriginalAcct = dpsFormData.OriginalAccount;
                _dpsform.GUID = System.Guid.NewGuid().ToString();
            }
            catch (Exception ex)
            {
                //We have some issue
            }
            //return the Json Object
            return Json(_dpsform, JsonRequestBehavior.AllowGet);
        }