예제 #1
0
        public MockDashboardInfoRepository()
        {
            dashboardInfo                = new Wp.CIS.LynkSystems.Model.DashboardInfo();
            merchantInfo.merchantId      = 570343;
            merchantInfo.customerID      = 393727;
            merchantInfo.activationDt    = DateTime.Now;
            merchantInfo.sicCode         = 5812;
            merchantInfo.industryType    = 2;
            merchantInfo.merchantNbr     = "232333";
            merchantInfo.acquiringBankId = 13;
            merchantInfo.programType     = 40;
            merchantInfo.statusIndicator = 6;
            merchantInfo.fnsNbr          = "0";
            merchantInfo.benefitType     = 0;
            merchantInfo.riskLevelID     = 1;
            merchantInfo.merchantType    = 1;
            merchantInfo.incrementalDt   = DateTime.Now;
            merchantInfo.thresholdDt     = DateTime.Now;
            merchantInfo.brandID         = 1;
            merchantInfo.sicDesc         = "RESTAURANTS";
            merchantInfo.merchantClass   = 'A';
            merchantInfo.riskLevel       = "1";
            merchantInfo.statDesc        = "New Account";
            merchantInfo.indTypeDesc     = "Restaurant";
            merchantInfo.mchName         = "Golden Corral 919";
            merchantInfo.mchAddress      = "2701 Coors Blvd NW";
            merchantInfo.mchCity         = "Albuquerque";
            merchantInfo.mchState        = "NM";
            merchantInfo.mchZipCode      = "87120";
            merchantInfo.mchPhone        = "5058314607";
            merchantInfo.mchContact      = "Store Manager";
            merchantInfo.acquiringBank   = "Citizens Trust Tier 1 Tier 2";
            merchantInfo.benefitTypeDesc = "None";
            merchantInfo.merchFedTaxID   = "561005071";

            customerProfile.customerID         = 393727;
            customerProfile.description        = "Golden Corral Corporation";
            customerProfile.activationDt       = DateTime.Now;
            customerProfile.statusIndicator    = 1;
            customerProfile.legalType          = 3;
            customerProfile.customerNbr        = "1000393727";
            customerProfile.classCode          = 0;
            customerProfile.sensitivityLevel   = 6;
            customerProfile.stmtTollFreeNumber = "18772827362";
            customerProfile.legalDesc          = "Corporation";
            customerProfile.senseLvlDesc       = "Tier 2";
            customerProfile.statDesc           = "Active";
            customerProfile.lynkAdvantage      = 0;
            customerProfile.pinPadPlus         = 0;
            customerProfile.giftLynk           = 1;
            customerProfile.rewardsLynk        = 1;
            customerProfile.demoID             = 393727;
            customerProfile.custName           = "Golden Corral Corporation";
            customerProfile.custContact        = "Terri Warren";
            customerProfile.prinID             = 393727;
            customerProfile.prinName           = "Theodore Fowler";
            customerProfile.prinAddress        = "5151 Glenwood Ave";
            customerProfile.prinCity           = "Raleigh";
            customerProfile.prinState          = "NC";
            customerProfile.prinZipcode        = "27612";
            customerProfile.prinSSN            = "561005071";

            terminalInfo.customerID        = 393727;
            terminalInfo.merchantId        = 570343;
            terminalInfo.terminalId        = "LK429221";
            terminalInfo.businessType      = 2;
            terminalInfo.programType       = 0;
            terminalInfo.activationDt      = DateTime.Now;
            terminalInfo.downLoadDate      = DateTime.Now;
            terminalInfo.sentToStratusDate = DateTime.Now;
            terminalInfo.cspStatusInterval = "2";
            terminalInfo.commType          = 2;
            terminalInfo.statusIndicator   = 1;
            terminalInfo.cutOffTime        = "400";
            terminalInfo.captureType       = 0;
            terminalInfo.defaultNetwork    = 0;
            terminalInfo.originalSO        = 838033;
            terminalInfo.incrementalDt     = DateTime.Now;
            terminalInfo.busTypeDesc       = "Payment";
            terminalInfo.cashAdv           = 0;
            terminalInfo.checkSvc          = 0;
            terminalInfo.credit            = 1;
            terminalInfo.debit             = 0;
            terminalInfo.ebt          = 0;
            terminalInfo.fleet        = 0;
            terminalInfo.pob          = 0;
            terminalInfo.suppLA       = 0;
            terminalInfo.merchantName = "Golden Corral 919";
            terminalInfo.statDesc     = "Active";

            custDemographicsList.Add(new Demographics()
            {
                Level         = "Customer",
                Name          = "Golden Corral Corporation",
                Address       = "5151 Glenwood Ave. ",
                City          = "Raleigh",
                State         = "NC",
                ZipCode       = "27612",
                Phone         = "9197819310",
                Contact       = "Terri Warren",
                AddressType   = "Customer",
                AddressTypeID = 11,
                County        = "Wake",
                NameAddressID = 3301636,
            });
            custDemographicsList.Add(new Demographics()
            {
                Level         = "Customer",
                Name          = "Theodore Fowler",
                Address       = "5151 Glenwood Ave",
                City          = "Raleigh",
                State         = "NC",
                ZipCode       = "27612",
                Phone         = "9197819310",
                Contact       = "Theodore Fowler",
                SSN           = "561005071",
                AddressType   = "Principal",
                AddressTypeID = 17,
                County        = "Wake",
                NameAddressID = 3302202,
            });

            merchDemographicsList.Add(new Demographics()
            {
                Level         = "Merchant",
                Name          = "Metropolitan Investment GRP 3",
                Address       = "4500 N 32nd Street Suite 200",
                City          = "Phoenix",
                State         = "AZ",
                ZipCode       = "85018",
                Phone         = "6029129000",
                Fax           = "6029129478",
                Contact       = "Trish Don Francesco",
                Title         = "Owner",
                SSN           = "503602306",
                AddressType   = "IRS 1099",
                AddressTypeID = 68,
                County        = "Maricopa",
                NameAddressID = 6491283
            });
            merchDemographicsList.Add(new Demographics()
            {
                Level         = "Merchant",
                Name          = " Investment GRP 3",
                Address       = "N 32nd Street Suite 200",
                City          = "Phoenix",
                State         = "AZ",
                ZipCode       = "85018",
                Phone         = "6029129000",
                Fax           = "6029129478",
                Contact       = "Trish Don Francesco",
                Title         = "Owner",
                SSN           = "503602306",
                AddressType   = "IRS 1099",
                AddressTypeID = 68,
                County        = "Maricopa",
                NameAddressID = 6491283
            });
            merchDemographicsList.Add(new Demographics()
            {
                Level         = "Merchant",
                Name          = " Investment GRP 3",
                Address       = "N 32nd Street Suite 200",
                City          = "Phoenix",
                State         = "AK",
                ZipCode       = "85018",
                Phone         = "6029129000",
                Fax           = "6029129478",
                Contact       = "Trish Don Francesco",
                Title         = "Owner",
                SSN           = "503602306",
                AddressType   = "IRS 1099",
                AddressTypeID = 68,
                County        = "Maricopa",
                NameAddressID = 6491283
            });

            termDemographics.Add(new Demographics()
            {
                Level         = "Terminal",
                Name          = "Theodore Fowler",
                Address       = "5151 Glenwood Ave",
                City          = "Raleigh",
                State         = "NC",
                ZipCode       = "27612",
                Phone         = "9197819310",
                Contact       = "Theodore Fowler",
                SSN           = "561005071",
                AddressType   = "Principal",
                AddressTypeID = 17,
                County        = "Wake",
                NameAddressID = 3302202,
            });
            termDemographics.Add(new Demographics()
            {
                Level         = "Terminal",
                Name          = "Metropolitan Investment GRP 3",
                Address       = "4500 N 32nd Street Suite 200",
                City          = "Phoenix",
                State         = "AZ",
                ZipCode       = "85018",
                Phone         = "6029129000",
                Fax           = "6029129478",
                Contact       = "Trish Don Francesco",
                Title         = "Owner",
                SSN           = "503602306",
                AddressType   = "IRS 1099",
                AddressTypeID = 68,
                County        = "Maricopa",
                NameAddressID = 6491283
            });
            termDemographics.Add(new Demographics()
            {
                Level         = "Terminal",
                Name          = " Investment GRP 3",
                Address       = "N 32nd Street Suite 200",
                City          = "Phoenix",
                State         = "AZ",
                ZipCode       = "85018",
                Phone         = "6029129000",
                Fax           = "6029129478",
                Contact       = "Trish Don Francesco",
                Title         = "Owner",
                SSN           = "503602306",
                AddressType   = "IRS 1099",
                AddressTypeID = 68,
                County        = "Maricopa",
                NameAddressID = 6491283
            });
        }
예제 #2
0
        public async Task <Wp.CIS.LynkSystems.Model.DashboardInfo> GetDashboardSearchResults(Helper.LIDTypes LIDtype, int LID, int maxRecordCount)
        {
            try
            {
                string inputType  = LIDtype.ToString();
                string outputType = inputType.Replace("ID", "").Replace("Nbr", "");
                Wp.CIS.LynkSystems.Model.DashboardInfo dbInfo = new Wp.CIS.LynkSystems.Model.DashboardInfo();

                return(await this._connectionFactory.GetConnection(async c =>
                {
                    var p = new DynamicParameters();
                    p.Add("OutputType", outputType, DbType.String, ParameterDirection.Input);
                    p.Add("LidType", LIDtype, DbType.Int32, ParameterDirection.Input);
                    p.Add("Lid", LID, dbType: DbType.Int32, direction: ParameterDirection.Input);
                    //  p.Add("SelectTopMaxNumber", 500, dbType: DbType.Int32, direction: ParameterDirection.ReturnValue);

                    p.Add("TotalCaseHistoryRecords", dbType: DbType.Int32, direction: ParameterDirection.Output);
                    p.Add("TotalDemographicsRecords", dbType: DbType.Int32, direction: ParameterDirection.Output);
                    p.Add("TotalMerchantRecords", dbType: DbType.Int32, direction: ParameterDirection.Output);
                    using (var multi = c.QueryMultiple("CISPlus.uspCISPlusGetDashboardInfo", p, commandType: CommandType.StoredProcedure))
                    {
                        switch (LIDtype)
                        {
                        case Helper.LIDTypes.TerminalNbr:
                        case Helper.LIDTypes.TerminalID:
                            dbInfo.TermInfo = multi.Read <TerminalInfo>().FirstOrDefault();
                            dbInfo.MerchInfo = multi.Read <MerchantInfo>().FirstOrDefault();
                            dbInfo.CustProfile = multi.Read <CustomerProfile>().FirstOrDefault();
                            break;

                        case Helper.LIDTypes.MerchantID:
                        case Helper.LIDTypes.MerchantNbr:
                            dbInfo.MerchInfo = multi.Read <MerchantInfo>().FirstOrDefault();
                            dbInfo.CustProfile = multi.Read <CustomerProfile>().FirstOrDefault();
                            break;

                        case Helper.LIDTypes.CustomerID:
                        case Helper.LIDTypes.CustomerNbr:
                            dbInfo.CustProfile = multi.Read <CustomerProfile>().FirstOrDefault();
                            break;

                        default:
                            break;
                        }

                        dbInfo.GroupInfo = multi.Read <Group>().FirstOrDefault();
                        dbInfo.ActvServices = multi.Read <ActiveServices>().FirstOrDefault();
                        dbInfo.DemographicsInfo = multi.Read <Demographics>().ToList();
                        dbInfo.MerchantsList = multi.Read <Merchant>().ToList();
                        dbInfo.CaseHistorysList = multi.Read <Wp.CIS.LynkSystems.Model.CaseHistory>().ToList();
                        dbInfo.TotalNumberOfCaseHistoryRecords = p.Get <int>("TotalCaseHistoryRecords");
                    }

                    if (dbInfo.DemographicsInfo != null && dbInfo.DemographicsInfo.Count > 0)
                    {
                        dbInfo.DemographicsInfoCust = dbInfo.DemographicsInfo.Where(d => d.Level == "Customer").ToList();
                        dbInfo.DemographicsInfoMerch = dbInfo.DemographicsInfo.Where(d => d.Level == "Merchant").ToList();
                        dbInfo.DemographicsInfoTerm = dbInfo.DemographicsInfo.Where(d => d.Level == "Terminal").ToList();
                    }

                    return dbInfo;
                }));
            }
            catch (Exception)
            {
                throw;
            }
        }