Esempio n. 1
0
        // Fire all neurons in this layer with received data
        public LinkedList <double> Run(LinkedList <double> dataSet)
        {
            DataSetInput = dataSet;
            DataSetOutput.Clear();

            if (IsInputLayer(LayerType))
            {
                int i = 0;
                foreach (double data in dataSet)
                {
                    LinkedList <double> temp = new LinkedList <double>();
                    temp.AddFirst(data);
                    Neurons[i].Run(temp);
                    DataSetOutput.AddLast(Neurons[i++].Axon.activatedSignal);
                }
            }
            else
            {
                foreach (NeuronSigmoid neuron in Neurons)
                {
                    neuron.Run(DataSetInput);
                    DataSetOutput.AddLast(neuron.Axon.activatedSignal);
                }
            }

            return(DataSetOutput);
        }
Esempio n. 2
0
 public BuildRpt(string StoreNum, DateTime dateTime, DataSetOutput reportData)
 {
     Context      = new ReportContext();
     _reportDate  = dateTime;
     _reportData  = reportData;
     _storeNumber = StoreNum;
     SetDefaults(".\\", "rpt_096.pdf");
 }
Esempio n. 3
0
 public BuildRpt(string StoreNum, DateTime dateTime, DataSetOutput reportData, string reportDir, string rptFileName)
 {
     Context      = new ReportContext();
     _reportDate  = dateTime;
     _reportData  = reportData;
     _storeNumber = StoreNum;
     SetDefaults(reportDir, rptFileName);
 }
Esempio n. 4
0
        //*********************************************************************
        //** Date created: Tuesday, Jan 19, 2010
        //** Created by  : PAWN\rmcbai1
        //*********************************************************************
        /// <summary>
        ///    build the datasets needed to generate the report
        /// </summary>
        ///
        /// <returns> the data needed to build the report ( DataSet)</returns>
        //*********************************************************************
        public DataSetOutput BuildDataset()
        {
            _reportData = null;

            try
            {
                DataAccessTools dataAccessTools = DataAccessService.CreateDataAccessTools();

                DataAccessService.Connect(_Credentials,
                                          DataAccessTools.ConnectMode.SINGLE,
                                          DataAccessTools.LogMode.DEBUG,
                                          ref dataAccessTools);


                List <OracleProcParam> inParams = new List <OracleProcParam>();

                inParams.Add(new OracleProcParam("store_num", _storeNum));
                string date_in = _runDate.ToString("d");
                inParams.Add(new OracleProcParam("date_in", date_in));

                string date_out = _runEndDate.ToString("d");
                inParams.Add(new OracleProcParam("date_out", date_out));

                List <PairType <string, string> > refCursors = new List <PairType <string, string> >();
                refCursors.Add(new PairType <string, string>("o_disp_data", "DISP_DATA"));

                inParams.Add(new OracleProcParam("o_store_name", OracleDbType.Varchar2, _storeName, ParameterDirection.Output, 100));

                bool retval = DataAccessService.ExecuteStoredProc(_Credentials.DBSchema
                                                                  , "PAWN_REPORTS"
                                                                  , "getData"
                                                                  , inParams
                                                                  , null
                                                                  , refCursors
                                                                  , "o_error_code"
                                                                  , "o_error_text"
                                                                  , null
                                                                  , out _errCode
                                                                  , out _errTxt
                                                                  , out _reportData
                                                                  , ref dataAccessTools);

                if (!retval)
                {
                    retval = DataAccessService.ExecuteStoredProc(_Credentials.DBSchema
                                                                 , "PAWN_REPORTS"
                                                                 , "getData"
                                                                 , inParams
                                                                 , null
                                                                 , refCursors
                                                                 , "o_error_code"
                                                                 , "o_error_text"
                                                                 , null
                                                                 , out _errCode
                                                                 , out _errTxt
                                                                 , out _reportData
                                                                 , ref dataAccessTools);
                }


                if (!retval)
                {
                    _errCode = "1";
                    _errTxt  = "An error occurred retrieving the report data.  Please try again, if this error persists then contact support.";
                }
            }
            catch (Exception ex)
            {
                _reportData = null;
                _errCode    = "1";
                _errTxt     = ex.Message;
            }


            return(_reportData);
        }
Esempio n. 5
0
        //*********************************************************************
        //** Date created: Tuesday, Jan 19, 2010
        //** Created by  : PAWN\rmcbai1
        //*********************************************************************
        /// <summary>
        ///    build the datasets needed to generate the report
        /// </summary>
        ///
        /// <returns> the data needed to build the report ( DataSet)</returns>
        //*********************************************************************
        public DataSetOutput BuildDataset()
        {
            _reportData = null;

            try
            {
                DataAccessTools dataAccessTools = DataAccessService.CreateDataAccessTools();

                DataAccessService.Connect(_Credentials,
                                          DataAccessTools.ConnectMode.SINGLE,
                                          DataAccessTools.LogMode.DEBUG,
                                          ref dataAccessTools);


                List <OracleProcParam> inParams = new List <OracleProcParam>();

                inParams.Add(new OracleProcParam("store_num", _storeNum));
                string date_in = _runDate.ToString("d");
                inParams.Add(new OracleProcParam("date_in", date_in));

                List <PairType <string, string> > refCursors = new List <PairType <string, string> >();
                refCursors.Add(new PairType <string, string>("o_cash_adv_1", "CASH_ADV_1"));
                refCursors.Add(new PairType <string, string>("o_xpp_2", "XPP_2"));
                refCursors.Add(new PairType <string, string>("o_payment_3", "PAYMENT_3"));
                refCursors.Add(new PairType <string, string>("o_recissions_4", "RECISSIONS_4"));
                refCursors.Add(new PairType <string, string>("o_debit_card_5", "DEBIT_CARDS_5"));
                refCursors.Add(new PairType <string, string>("o_phone_card_6", "PHONE_CARDS_6"));
                refCursors.Add(new PairType <string, string>("o_safe_transfer_7", "SAFE_TRANSFER_7"));
                refCursors.Add(new PairType <string, string>("o_drawer_transfer_7", "DRAWER_TRANSFER_7"));
                refCursors.Add(new PairType <string, string>("o_check_cashing_8", "CHECK_CASHING_8"));
                refCursors.Add(new PairType <string, string>("o_insurance_9", "INSURANCE_9"));
                refCursors.Add(new PairType <string, string>("o_convenience_11", "CONVENIENCE_11"));
                refCursors.Add(new PairType <string, string>("o_tax_prep_12", "TAX_PREP_12"));
                refCursors.Add(new PairType <string, string>("o_other_13", "OTHER_13"));
                refCursors.Add(new PairType <string, string>("o_money_order_14", "MONEY_ORDER_14"));
                refCursors.Add(new PairType <string, string>("o_wire_transfer_15", "WIRE_TRANSFER_15"));
                refCursors.Add(new PairType <string, string>("o_coupons_16", "COUPONS_16"));
                refCursors.Add(new PairType <string, string>("o_petty_cash_17", "PETTY_CASH_17"));
                refCursors.Add(new PairType <string, string>("o_paid_inout_18", "PAID_INOUT18"));
                refCursors.Add(new PairType <string, string>("o_extensions_19", "EXTENSIONS_19"));
                refCursors.Add(new PairType <string, string>("o_cancel_cso_20", "CANCEL_CSO_20"));
                refCursors.Add(new PairType <string, string>("o_ach_rvk_21", "ACH_RVK_21"));
                refCursors.Add(new PairType <string, string>("o_waive_off_22", "WAIVE_OFF_22"));
                refCursors.Add(new PairType <string, string>("o_reimbsmts_23", "REIMBURSEMENTS_23"));
                refCursors.Add(new PairType <string, string>("o_new_loans_24", "NEW_LOANS_24"));
                refCursors.Add(new PairType <string, string>("o_ext_25", "EXT_25"));
                refCursors.Add(new PairType <string, string>("o_renew_26", "RENEW_26"));
                refCursors.Add(new PairType <string, string>("o_paydown_27", "PAYDOWN_27"));
                refCursors.Add(new PairType <string, string>("o_pickup_28", "PICKUP_28"));
                refCursors.Add(new PairType <string, string>("o_seizure_29", "SEIZURE_29"));
                refCursors.Add(new PairType <string, string>("o_police_ret_30", "POLICE_RET_30"));
                refCursors.Add(new PairType <string, string>("o_claim_rel_31", "CLAIM_REL_31"));
                refCursors.Add(new PairType <string, string>("o_pfi_32", "PFI_32"));
                refCursors.Add(new PairType <string, string>("o_transfer_out_33", "TRANSFER_OUT_33"));
                refCursors.Add(new PairType <string, string>("o_purchase_37", "PURCHASE_37"));
                refCursors.Add(new PairType <string, string>("o_return_38", "RETURN_38"));

                refCursors.Add(new PairType <string, string>("O_RETAIL_40", "RETAIL_40"));
                refCursors.Add(new PairType <string, string>("O_RETAIL_40_DETL", "RETAIL_40_DETL"));
                refCursors.Add(new PairType <string, string>("O_LAYAWAY_41", "LAYAWAY_41"));
                refCursors.Add(new PairType <string, string>("O_LAYAWAY_41_DETL", "LAYAWAY_41_DETL"));
                refCursors.Add(new PairType <string, string>("O_SALE_REFUND", "SALE_REFUND"));
                refCursors.Add(new PairType <string, string>("O_SALE_REFUND_DETL", "SALE_REFUND_DETL"));
                refCursors.Add(new PairType <string, string>("O_LAYAWAY_REFUND", "LAYAWAY_REFUND"));
                refCursors.Add(new PairType <string, string>("o_forfeited", "LAYAWAY_TERMATION"));
                refCursors.Add(new PairType <string, string>("o_charge_off", "CHARGE_OFF"));
                refCursors.Add(new PairType <string, string>("O_PARPYMT_45", "O_PARPYMT_45"));

                /* var outParamList = new List<TupleType<string, DataTypeConstants.PawnDataType, int>>(1)
                 *                       {
                 *                           new TupleType<string, DataTypeConstants.PawnDataType, int>
                 *                                   (
                 *                                       "o_store_name",
                 *                                       DataTypeConstants.PawnDataType.STRING, 40
                 *                                   )
                 *                       };*/
                inParams.Add(new OracleProcParam("o_store_name", OracleDbType.Varchar2, _storeName, ParameterDirection.Output, 100));
                bool retval = DataAccessService.ExecuteStoredProc(_Credentials.DBSchema
                                                                  , "PAWN_DSTR"
                                                                  , "get_dstr_data"
                                                                  , inParams
                                                                  , null
                                                                  , refCursors
                                                                  , "o_error_code"
                                                                  , "o_error_text"
                                                                  , null
                                                                  , out _errCode
                                                                  , out _errTxt
                                                                  , out _reportData
                                                                  , ref dataAccessTools);

                if (!retval)
                {
                    retval = DataAccessService.ExecuteStoredProc(_Credentials.DBSchema
                                                                 , "PAWN_DSTR"
                                                                 , "get_dstr_data"
                                                                 , inParams
                                                                 , null
                                                                 , refCursors
                                                                 , "o_error_code"
                                                                 , "o_error_text"
                                                                 , null
                                                                 , out _errCode
                                                                 , out _errTxt
                                                                 , out _reportData
                                                                 , ref dataAccessTools);
                }


                if (!retval)
                {
                    _errCode = "1";
                    _errTxt  = "An error occurred retrieving the report data.  Please try again, if this error persists then contact support.";
                }
            }
            catch (Exception ex)
            {
                _reportData = null;
                _errCode    = "1";
                _errTxt     = ex.Message;
            }


            return(_reportData);
        }