コード例 #1
0
        public OutPutObj PostMAcct(MerchantAcctObj obj, int postType)
        {
            OutPutObj ret = new OutPutObj();
            var       p   = new DynamicParameters();

            p.Add("PID", obj.PID, DbType.String);
            p.Add("DEPOSIT_ACCOUNTNO", obj.DEPOSIT_ACCOUNTNO, DbType.String);
            p.Add("MERCHANTID", obj.MERCHANTID, DbType.String);
            p.Add("DEPOSIT_ACCTNAME", obj.DEPOSIT_ACCTNAME, DbType.String);
            p.Add("DEPOSIT_BANKADDRESS", obj.DEPOSIT_BANKADDRESS, DbType.String);
            p.Add("DEPOSIT_BANKCODE", obj.DEPOSIT_BANKCODE, DbType.String);
            p.Add("DEPOSIT_BANKNAME", obj.DEPOSIT_BANKNAME, DbType.String);
            p.Add("DEPOSIT_COUNTRYCODE", obj.DEPOSIT_COUNTRYCODE, DbType.String);
            p.Add("CREATEDATE", obj.CREATEDATE, DbType.DateTime);
            p.Add("USERID", obj.USERID, DbType.String);
            p.Add("SETTLEMENTCURRENCY", obj.SETTLEMENTCURRENCY, DbType.String);
            p.Add("DB_ITBID", obj.DB_ITBID, DbType.Decimal);
            p.Add("EVENTTYPE", obj.EVENTTYPE, DbType.String);
            p.Add("POSTTYPE", postType, DbType.Int16);
            p.Add("DEFAULT_ACCOUNT", obj.DEFAULT_ACCOUNT, DbType.Boolean);

            using (var con = new RepoBase().OpenConnection(null))
            {
                ret = con.Query <OutPutObj>("SESS_POST_MERCHANTACCT", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                return(ret);
            }
        }
コード例 #2
0
        private static bool TidExistDb(string tid)
        {
            using (var con = new RepoBase().OpenConnection(null))
            {
                var p = new DynamicParameters();
                //    p.Add(":P_INSTITUTION_ITBID", inst_itbid, OracleDbType.Int32);
                p.Add("@P_GEN_TID", tid, DbType.String);

                // p.Add(":CURSOR_", dbType: OracleDbType.RefCursor, direction: ParameterDirection.Output);
                string qry = "SELECT FUNC_TID_EXIST(:P_GEN_TID) RespCode FROM DUAL";  //@"GET_MID_ACCT";

                var rec = con.Query <OutPutObj>(qry, p, commandType: CommandType.Text).FirstOrDefault();
                if (rec != null)
                {
                    if (rec.RespCode == 0)
                    {
                        // mid does not exist before
                        return(false);
                    }
                    else
                    {
                        return(true);
                    }
                }
            }

            return(true);
        }
コード例 #3
0
        public List <SM_SETTLEMENTDETAIL> GetSettlementEnquiryObj(SettlementEnquiryObj obj)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("P_FROMDATE", obj.fromDate, DbType.DateTime);
            p.Add("P_TODATE", obj.toDate, DbType.DateTime);
            p.Add("@P_SETTDATE", obj.settDate, DbType.DateTime);
            p.Add("PAYREF", obj.payRef, DbType.String);
            p.Add("REFNO", obj.tranRef, DbType.String);
            p.Add("TRANSID", obj.tranID, DbType.Decimal);
            p.Add("MERCHANTDEPOSITBANK", obj.crBank, DbType.String);
            p.Add("DEBITBANK", obj.drBank, DbType.String);
            p.Add("MERCHANTID", obj.merchantID, DbType.String);
            p.Add("MERCHANTNAME", obj.merchantName, DbType.String);
            p.Add("CARDSCHEME", obj.cardScheme, DbType.String);
            p.Add("TRANAMOUNT", obj.tranAmt, DbType.Decimal);
            p.Add("ACQUIRERFIID", obj.acquirer, DbType.String);
            p.Add("ISSUERFIID", obj.issuer, DbType.String);
            p.Add("SETTLEMENTACCOUNT", obj.settAcct, DbType.String);
            p.Add("CHANNELID", obj.channel, DbType.Int32);
            p.Add("MASKPAN", obj.maskpan, DbType.String);
            p.Add("TERMINALID", obj.termID, DbType.String);
            p.Add("LOCATION", obj.mlocation, DbType.String);
            p.Add("INVOICENO", obj.invoiceNo, DbType.String);

            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <SM_SETTLEMENTDETAIL>("PROC_SETTLEMENTENQUIRY", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #4
0
        public OutPutObj PostSharingParty(SharingPartyObj obj, int postType)
        {
            OutPutObj ret = new OutPutObj();
            var       p   = new DynamicParameters();

            p.Add("PID", obj.PID, DbType.String);
            p.Add("BILLER_CODE", obj.BILLER_CODE, DbType.String);
            p.Add("PARTYITBID", obj.PARTYITBID, DbType.Int32);
            p.Add("BILLERMSC_ITBID", obj.BILLERMSC_ITBID, DbType.Decimal);

            p.Add("PARTY_LOCATOR", obj.PARTY_LOCATOR, DbType.String);
            p.Add("SHARINGVALUE", obj.SHARINGVALUE, DbType.Decimal);
            p.Add("CAP", obj.CAP, DbType.Decimal);
            p.Add("ACCOUNT_ID", obj.ACCOUNT_ID, DbType.Decimal);
            p.Add("CREATEDATE", obj.CREATEDATE, DbType.DateTime);
            p.Add("USERID", obj.USERID, DbType.String);
            p.Add("PARTYTYPE_CODE", obj.PARTYTYPE_CODE, DbType.String);

            p.Add("DB_ITBID", obj.DB_ITBID, DbType.Decimal);
            p.Add("EVENTTYPE", obj.EVENTTYPE, DbType.String);
            p.Add("POSTTYPE", postType, DbType.Int16);

            using (var con = new RepoBase().OpenConnection(null))
            {
                ret = con.Query <OutPutObj>("SESS_POST_SHARINGPARTY", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                return(ret);
            }
        }
コード例 #5
0
        public OutPutObj PostRevenueHead(RvHeadObj obj, int postType)
        {
            OutPutObj ret = new OutPutObj();
            var       p   = new DynamicParameters();

            p.Add("ID", obj.PID, DbType.String);
            p.Add("ACCOUNT_ID", obj.ACCOUNT_ID, DbType.Decimal);
            p.Add("CODE", obj.CODE, DbType.String);
            p.Add("RVGROUPCODE", obj.RVGROUPCODE, DbType.String);
            p.Add("MID", obj.MID, DbType.String);
            p.Add("PAYMENTITEMID", obj.PAYMENTITEMID, DbType.Int32);
            p.Add("DESCRIPTION", obj.DESCRIPTION, DbType.String);
            p.Add("BANKCODE", obj.BANKCODE, DbType.String);
            p.Add("BANKACCOUNT", obj.BANKACCOUNT, DbType.String);
            p.Add("BANK_NAME", obj.BANK_NAME, DbType.String);
            p.Add("ACCT_NAME", obj.ACCT_NAME, DbType.String);
            p.Add("CREATEDATE", obj.CREATEDATE, DbType.DateTime);
            p.Add("USERID", obj.USERID, DbType.String);
            p.Add("STATUS", obj.STATUS, DbType.String);
            p.Add("DB_ITBID", obj.DB_ITBID, DbType.Int32);
            p.Add("EVENTTYPE", obj.EVENTTYPE, DbType.String);
            p.Add("POSTTYPE", postType, DbType.Int16);
            p.Add("SETTLEMENT_FREQUENCY", obj.SETTLEMENT_FREQUENCY, DbType.Int32);
            p.Add("FREQUENCY_DESC", obj.FREQUENCY_DESC, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                ret = con.Query <OutPutObj>("POST_REVENUEHEAD_SESSION", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                if (obj.RevenueSharingPartys != null)
                {
                    foreach (var pty in obj.RevenueSharingPartys)
                    {
                        p = new DynamicParameters();
                        p.Add("PartyId", pty.PartyId, DbType.Int32);
                        p.Add("PartyAccountId", pty.PartyAccountId, DbType.Decimal);
                        p.Add("PartyValue", pty.PartyValue, DbType.Decimal);
                        p.Add("RvCode", obj.CODE, DbType.String);
                        p.Add("UserId", obj.USERID, DbType.String);
                        p.Add("CreateDate", obj.CREATEDATE, DbType.DateTime);

                        ret = con.Query <OutPutObj>("Post_RevenuHeadParty_Session", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                    }
                }

                return(ret);
            }
        }
コード例 #6
0
        public List <ApprovalRouteOffObj> GetRouteOfficer(string userId)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <ApprovalRouteOffObj>("SESS_GET_APPROVALOFFICER", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #7
0
        public List <TerminalObj> GetTerminal2(string userId)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <TerminalObj>("SESS_GET_TERMINAL2", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #8
0
        public List <SetReconUpldObj> ReconcileBatch(string userId)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <SetReconUpldObj>("SESS_SET_RECONCILE", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #9
0
        public List <DataBinUpldObj> GetDataBinUpload(string userId)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <DataBinUpldObj>("SESS_GET_DATABINUPLD", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #10
0
        //public OutPutObj PostRevenueHeadBulk(List<RvHeadObj> objList)
        //{
        //    OutPutObj ret = new OutPutObj();
        //    var p = new DynamicParameters();
        //    using (var con = new RepoBase().OpenConnection(null))
        //    {
        //        foreach (var obj in objList)
        //        {
        //            ret = con.Query<OutPutObj>("POST_REVENUEHEAD_SESSION", p, commandType: CommandType.StoredProcedure).FirstOrDefault();

        //        }
        //        return ret;
        //    }

        //}
        public List <RvHeadObj> GetRevenueHead(string userId)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <RvHeadObj>("GET_SM_REVENUEHEAD_SESSION", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #11
0
        //public OutPutObj PostRevenueHeadBulk(List<RvHeadObj> objList)
        //{
        //    OutPutObj ret = new OutPutObj();
        //    var p = new DynamicParameters();
        //    using (var con = new RepoBase().OpenConnection(null))
        //    {
        //        foreach (var obj in objList)
        //        {
        //            ret = con.Query<OutPutObj>("POST_REVENUEHEAD_SESSION", p, commandType: CommandType.StoredProcedure).FirstOrDefault();

        //        }
        //        return ret;
        //    }

        //}
        public List <MerchantAcctObj> GetMerchantAcct(string userId)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <MerchantAcctObj>("SESS_GET_MERCHANTACCT", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #12
0
        //public OutPutObj PostRevenueHeadBulk(List<RvHeadObj> objList)
        //{
        //    OutPutObj ret = new OutPutObj();
        //    var p = new DynamicParameters();
        //    using (var con = new RepoBase().OpenConnection(null))
        //    {
        //        foreach (var obj in objList)
        //        {
        //            ret = con.Query<OutPutObj>("POST_REVENUEHEAD_SESSION", p, commandType: CommandType.StoredProcedure).FirstOrDefault();

        //        }
        //        return ret;
        //    }

        //}
        public List <SharingPartyObj> GetSharingParty(string userId)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <SharingPartyObj>("SESS_GET_SHARINGPARTY", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #13
0
        public static List <NapsObj> GetNaps(string userId, string batchId)
        {
            // OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            p.Add("BATCHID", batchId, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <NapsObj>("SESS_GET_NAPS", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #14
0
        public List <RevenueSharingPartyObj> GetRevenueHeadParty(string rvCode, string userId)
        {
            //OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("UserId", userId, DbType.String);
            p.Add("RvCode", rvCode, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <RevenueSharingPartyObj>("Get_RevenueHeadParty_Sess", p, commandType: CommandType.StoredProcedure).ToList();
                return(ret);
            }
        }
コード例 #15
0
        public RvHeadObj FindRevenueHead(string Id, string userId)
        {
            //OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            p.Add("ID", Id, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <RvHeadObj>("FIND_REVENUEHEAD_SESSION", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                return(ret);
            }
        }
コード例 #16
0
        public SharingPartyObj FindSharingParty(string Id, string userId)
        {
            //OutPutObj ret = new OutPutObj();
            var p = new DynamicParameters();

            p.Add("USERID", userId, DbType.String);
            p.Add("ID", Id, DbType.String);
            using (var con = new RepoBase().OpenConnection(null))
            {
                var ret = con.Query <SharingPartyObj>("SESS_FIND_SHARINGPARTY", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                return(ret);
            }
        }
コード例 #17
0
        public OutPutObj PostRouteOfficer(ApprovalRouteOffObj obj, int postType)
        {
            OutPutObj ret = new OutPutObj();
            var       p   = new DynamicParameters();

            p.Add("PID", obj.PID, DbType.String);
            p.Add("APPROVER_ID", obj.APPROVER_ID, DbType.String);
            p.Add("MENUID", obj.MENUID, DbType.Int32);
            p.Add("PRIORITY", obj.PRIORITY, DbType.Int32);
            p.Add("CREATEDATE", obj.CREATEDATE, DbType.DateTime);
            p.Add("USERID", obj.USERID, DbType.String);
            p.Add("DB_ITBID", obj.DB_ITBID, DbType.Int32);
            p.Add("EVENTTYPE", obj.EVENTTYPE, DbType.String);
            p.Add("POSTTYPE", postType, DbType.Int16);
            using (var con = new RepoBase().OpenConnection(null))
            {
                ret = con.Query <OutPutObj>("SESS_POST_APPROVALOFFICER", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                return(ret);
            }
        }
コード例 #18
0
        public OutPutObj PostTerminal(TerminalObj obj, int postType)
        {
            OutPutObj ret = new OutPutObj();
            var       p   = new DynamicParameters();

            p.Add("PID", obj.PID, DbType.String);
            p.Add("TERMINALID", obj.TERMINALID, DbType.String);
            p.Add("MERCHANTID", obj.MERCHANTID, DbType.String);
            p.Add("ACCOUNT_ID", obj.ACCOUNT_ID, DbType.Decimal);
            p.Add("PTSA", obj.PTSA, DbType.String);
            p.Add("PTSP", obj.PTSP, DbType.String);
            p.Add("TRANSACTION_CURRENCY", obj.TRANSACTION_CURRENCY, DbType.String);
            p.Add("SETTLEMENT_CURRENCY", obj.SETTLEMENT_CURRENCY, DbType.String);
            p.Add("CREATEDATE", obj.CREATEDATE, DbType.DateTime);
            p.Add("USERID", obj.USERID, DbType.String);
            p.Add("STATUS", obj.STATUS, DbType.String);
            p.Add("DB_ITBID", obj.DB_ITBID, DbType.Decimal);
            p.Add("EVENTTYPE", obj.EVENTTYPE, DbType.String);
            p.Add("POSTTYPE", postType, DbType.Int16);
            p.Add("SETTLEMENT_FREQUENCY", obj.SETTLEMENT_FREQUENCY, DbType.Int32);
            p.Add("TERMINALMODEL_CODE", obj.TERMINALMODEL_CODE, DbType.String);
            p.Add("TERMINALOWNER_CODE", obj.TERMINALOWNER_CODE, DbType.String);
            p.Add("EmailAlert", obj.EmailAlert, DbType.Boolean);
            p.Add("VISAACQUIRERIDNO", obj.VISAACQUIRERIDNO, DbType.String);
            p.Add("MASTACQUIRERIDNO", obj.MASTACQUIRERIDNO, DbType.String);
            p.Add("VERVACQUIRERIDNO", obj.VERVACQUIRERIDNO, DbType.String);
            p.Add("SLIP_FOOTER", obj.SLIP_FOOTER, DbType.String);
            p.Add("SLIP_HEADER", obj.SLIP_HEADER, DbType.String);
            p.Add("ACCOUNTID", obj.ACCOUNTID, DbType.String);
            p.Add("DEPOSIT_ACCOUNTNO", obj.DEPOSIT_ACCOUNTNO, DbType.String);
            p.Add("DEPOSIT_ACCTNAME", obj.DEPOSIT_ACCTNAME, DbType.String);
            p.Add("DEPOSIT_BANKNAME", obj.DEPOSIT_BANKNAME, DbType.String);
            p.Add("IS_NEWACCT", obj.IS_NEWACCT, DbType.Boolean);

            using (var con = new RepoBase().OpenConnection(null))
            {
                ret = con.Query <OutPutObj>("SESS_POST_TERMINAL", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                return(ret);
            }
        }
コード例 #19
0
        public static OutPutObj GenerateNaps(DateTime sett_date, int channelid, int ID, string bid, string reqType, string userId)
        {
            var cnt     = 0;
            var rowCnt  = 0;
            var curDate = DateTime.Now;
            DynamicParameters p;

            using (var con = new RepoBase().OpenConnection(null))
            {
                p = new DynamicParameters();
                p.Add("ReqType", reqType, DbType.String);
                p.Add("SetDate", sett_date, DbType.Date);
                var tt = con.Query <OutPutObj>("proc_ValidateNapsNibss", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                if (tt.RespCode == 1)
                {
                    return(tt);
                }
                // var dtMain = rptSett.generateDS("", "", "NIBSS_ALL", "U", "NAPS", sett_date.ToString("yyyy-MM-dd"), null, null,null);
                dsLoadclass dv = new dsLoadclass();

                if (ID == 1)
                {
                    var dtMain = dv.generateDS("", "", "NIBSS_ALL", "U", "NAPS", sett_date.ToString("yyyy-MM-dd"), channelid);
                    p = new DynamicParameters();
                    p.Add("USERID", userId, DbType.String);
                    var t2  = con.Execute("SESS_PURGE_NAPS", p, commandType: CommandType.StoredProcedure);
                    int sqn = 0;
                    rowCnt = dtMain.Rows.Count;
                    foreach (DataRow dsrow in dtMain.Rows)
                    {
                        sqn++;
                        p = new DynamicParameters();
                        NapsObj obj = new NapsObj()
                        {
                            DEBITACCTNO          = dsrow[0].ToString(),
                            DEBITBANKCODE        = dsrow[1].ToString(),
                            BENEFICIARYNAME      = dsrow[2].ToString(),
                            BENEFICIARYACCTNO    = dsrow[3].ToString(),
                            BENEFICIARYBANKCODE  = dsrow[4].ToString(),
                            CREDITAMOUNT         = decimal.Parse(dsrow[5].ToString()),
                            BENEFICIARYNARRATION = dsrow[6].ToString(),
                            BATCHID        = bid,
                            CREATEDATE     = curDate,
                            REQUESTTYPE    = reqType,
                            SETTLEMENTDATE = sett_date,
                            USERID         = userId,
                            MERCHANTID     = dsrow[7].ToString(),//TAKE NOTE
                        };
                        p.Add("DEBITACCTNO", obj.DEBITACCTNO, DbType.String);
                        p.Add("DEBITBANKCODE", obj.DEBITBANKCODE, DbType.String);
                        p.Add("BENEFICIARYACCTNO", obj.BENEFICIARYACCTNO, DbType.String);
                        p.Add("BENEFICIARYBANKCODE", obj.BENEFICIARYBANKCODE, DbType.String);
                        p.Add("BENEFICIARYNAME", obj.BENEFICIARYNAME, DbType.String);
                        p.Add("BENEFICIARYNARRATION", obj.BENEFICIARYNARRATION, DbType.String);
                        p.Add("CREDITAMOUNT", obj.CREDITAMOUNT, DbType.Decimal);
                        p.Add("SETTLEMENTDATE", obj.SETTLEMENTDATE, DbType.Date);
                        p.Add("MERCHANTID", obj.MERCHANTID, DbType.String);
                        p.Add("REQUESTTYPE", obj.REQUESTTYPE, DbType.String);
                        p.Add("USERID", obj.USERID, DbType.String);
                        p.Add("CREATEDATE", obj.CREATEDATE, DbType.DateTime);
                        p.Add("BATCHID", obj.BATCHID, DbType.String);
                        p.Add("REASON", obj.REASON, DbType.String);
                        p.Add("PID", obj.PID, DbType.String);
                        p.Add("POSTTYPE", 1, DbType.String);
                        p.Add("EVENTTYPE", "New", DbType.String);
                        p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String);
                        p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String);
                        p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String);
                        p.Add("PostSequence", sqn++, DbType.Int32);
                        cnt += con.Execute("SESS_POST_NAPS", p, commandType: CommandType.StoredProcedure);
                    }
                }
                else
                {
                    var dtMain = dv.generateDS("", "", "NIBSS_ALL", "U", "NEFT", sett_date.ToString("yyyy-MM-dd"), channelid);

                    p = new DynamicParameters();
                    p.Add("USERID", userId, DbType.String);
                    var t2  = con.Execute("SESS_PURGE_NAPS", p, commandType: CommandType.StoredProcedure);
                    int sqn = 0;
                    rowCnt = dtMain.Rows.Count;
                    foreach (DataRow dsrow in dtMain.Rows)
                    {
                        sqn++;
                        p = new DynamicParameters();
                        NapsObj obj = new NapsObj()
                        {
                            DEBITACCTNO          = dsrow[0].ToString(),
                            DEBITBANKCODE        = dsrow[1].ToString(),
                            BENEFICIARYNAME      = dsrow[2].ToString(),
                            BENEFICIARYACCTNO    = dsrow[3].ToString(),
                            BENEFICIARYBANKCODE  = dsrow[4].ToString(),
                            CREDITAMOUNT         = decimal.Parse(dsrow[5].ToString()),
                            BENEFICIARYNARRATION = dsrow[6].ToString(),
                            BATCHID        = bid,
                            CREATEDATE     = curDate,
                            REQUESTTYPE    = reqType,
                            SETTLEMENTDATE = sett_date,
                            USERID         = userId,
                            MERCHANTID     = dsrow[7].ToString(),//TAKE NOTE
                        };
                        p.Add("DEBITACCTNO", obj.DEBITACCTNO, DbType.String);
                        p.Add("DEBITBANKCODE", obj.DEBITBANKCODE, DbType.String);
                        p.Add("BENEFICIARYACCTNO", obj.BENEFICIARYACCTNO, DbType.String);
                        p.Add("BENEFICIARYBANKCODE", obj.BENEFICIARYBANKCODE, DbType.String);
                        p.Add("BENEFICIARYNAME", obj.BENEFICIARYNAME, DbType.String);
                        p.Add("BENEFICIARYNARRATION", obj.BENEFICIARYNARRATION, DbType.String);
                        p.Add("CREDITAMOUNT", obj.CREDITAMOUNT, DbType.Decimal);
                        p.Add("SETTLEMENTDATE", obj.SETTLEMENTDATE, DbType.Date);
                        p.Add("MERCHANTID", obj.MERCHANTID, DbType.String);
                        p.Add("REQUESTTYPE", obj.REQUESTTYPE, DbType.String);
                        p.Add("USERID", obj.USERID, DbType.String);
                        p.Add("CREATEDATE", obj.CREATEDATE, DbType.DateTime);
                        p.Add("BATCHID", obj.BATCHID, DbType.String);
                        p.Add("REASON", obj.REASON, DbType.String);
                        p.Add("PID", obj.PID, DbType.String);
                        p.Add("POSTTYPE", 1, DbType.String);
                        p.Add("EVENTTYPE", "New", DbType.String);
                        p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String);
                        p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String);
                        p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String);
                        p.Add("PostSequence", sqn++, DbType.Int32);
                        cnt += con.Execute("SESS_POST_NAPS", p, commandType: CommandType.StoredProcedure);
                    }
                }

                OutPutObj ret = new OutPutObj();

//==========================================

                if (rowCnt == 0)
                {
                    ret = new OutPutObj()
                    {
                        RespCode    = 1,
                        RespMessage = "No Record found for selected date."
                    };
                }
                else if (cnt == rowCnt)
                {
                    ret = new OutPutObj()
                    {
                        RespCode    = 0,
                        RespMessage = ""
                    };
                }
                else
                {
                    ret = new OutPutObj()
                    {
                        RespCode    = 1,
                        RespMessage = ""
                    };
                }
                return(ret);
            }
        }