public int PostRvDrAcctUpload(RvDrAcctUpldObj obj, int postType, string userId) { //OutPutObj ret = new OutPutObj(); var p = new DynamicParameters(); p.Add("@PID", obj.PID, DbType.String); p.Add("@GROUPCODE", obj.RVGROUPCODE, DbType.String); p.Add("@MERCHANTID", obj.MERCHANTID, DbType.String); p.Add("@AGENTCODE", obj.AGENT_CODE, DbType.String); p.Add("@BANKACCTNAME", obj.BANKACCTNAME, DbType.String); p.Add("@BANKACCTNO", obj.BANKACCTNO, DbType.String); p.Add("@BANKCODE", obj.BANKCODE, DbType.String); p.Add("USERID", userId, DbType.String); p.Add("STATUS", obj.STATUS, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); p.Add("POSTTYPE", 2, DbType.Int16); p.Add("PostSequence", obj.POSTSEQUENCE, DbType.Int32); using (var con = new RepoBase().OpenConnection(null)) { var rst = con.Execute("SESS_POST_RVDRACCTUPLD", p, commandType: CommandType.StoredProcedure); return(rst); } }
public static int PostNaps(NapsObj obj, int postType) { //OutPutObj ret = new OutPutObj(); var p = new DynamicParameters(); 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("REASON", obj.REASON, 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("PID", obj.PID, DbType.String); p.Add("POSTTYPE", postType, DbType.String); p.Add("EVENTTYPE", obj.EVENTTYPE, DbType.String); p.Add("MERCHANTID", obj.MERCHANTID, DbType.String); p.Add("PostSequence", null, DbType.Int32); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.Boolean); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); using (var con = new RepoBase().OpenConnection(null)) { var rst = con.Execute("SESS_POST_NAPS", p, commandType: CommandType.StoredProcedure); return(rst); } }
public int PostRvHeadUpload(RvHeadUpldObj obj, int postType, string userId) { //OutPutObj ret = new OutPutObj(); var p = new DynamicParameters(); p.Add("@ID", obj.PID, DbType.String); p.Add("@RVCODE", obj.RVCODE, DbType.String); p.Add("@GROUPCODE", obj.GROUPCODE, DbType.String); p.Add("@DESCRIPTION", obj.DESCRIPTION, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); p.Add("@USERID", userId, DbType.String); p.Add("@STATUS", obj.STATUS, DbType.String); p.Add("@PAYMENTITEMID", obj.PAYMENTITEMID, DbType.Int32); p.Add("@BANKCODE", obj.BANKCODE, DbType.String); p.Add("@BANKACCOUNT", obj.BANKACCOUNT, DbType.String); p.Add("@SETTLEMENT_FREQUENCY", obj.SETTLEMENT_FREQUENCY, DbType.Int32); p.Add("@POSTTYPE", 2, DbType.Int16); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); p.Add("@PostSequence", obj.POSTSEQUENCE, DbType.Int32); p.Add("@ACCOUNT_ID", obj.ACCOUNT_ID, DbType.Decimal); using (var con = new RepoBase().OpenConnection(null)) { var rst = con.Execute("SESS_POST_RVHEADUPLD", p, commandType: CommandType.StoredProcedure); return(rst); } }
public int PostBinUpload(DataBinUpldObj obj, int postType, string userId) { //OutPutObj ret = new OutPutObj(); var p = new DynamicParameters(); p.Add("@PID", obj.PID, DbType.String); p.Add("@BANKFIID", obj.BANKFIID, DbType.String); p.Add("@BIN", obj.BIN, DbType.String); p.Add("@BUSINESSTYPE", obj.BUSINESSTYPE, DbType.String); p.Add("@CARDSCHEME", obj.CARDSCHEME, DbType.String); p.Add("@CBNCODE", obj.CBNCODE, DbType.String); p.Add("@COUNTRYCODE", obj.COUNTRYCODE, DbType.String); p.Add("@CURRENCYCODE", obj.CURRENCYCODE, DbType.String); p.Add("@ISSUERFIID", obj.ISSUERFIID, DbType.String); p.Add("@BATCHID", null, DbType.String); p.Add("USERID", userId, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); p.Add("POSTTYPE", postType, DbType.Int16); p.Add("POSTSEQUENCE", obj.POSTSEQUENCE, DbType.Int32); using (var con = new RepoBase().OpenConnection(null)) { var rst = con.Execute("SESS_POST_DATABINUPLD", p, commandType: CommandType.StoredProcedure); return(rst); } }
public int PostSetReconUpload(SetReconUpldObj obj, int postType, string userId) { //OutPutObj ret = new OutPutObj(); var p = new DynamicParameters(); p.Add("@PID", obj.PID, DbType.String); p.Add("@PAYREFNO", obj.PAYREFNO, DbType.String); p.Add("@AMOUNT", obj.AMOUNT, DbType.Decimal); p.Add("@PAYMENTDATE", obj.PAYMENTDATE, DbType.DateTime); p.Add("@VALUEDATE", obj.VALUEDATE, DbType.DateTime); //p.Add("@RECEIPTNO", obj.RECEIPTNO, DbType.String); p.Add("@CUSTOMERNAME", obj.CUSTOMERNAME, DbType.String); p.Add("@PAYMENTMETHOD", obj.PAYMENTMETHOD, DbType.String); //p.Add("@TRANSACTIONSTATUS", obj.TRANSACTIONSTATUS, DbType.String); //p.Add("@DEPOSITSLIPNO", obj.DEPOSITSLIPNO, DbType.String); p.Add("@BANKNAME", obj.BANKNAME, DbType.String); //p.Add("@BRANCHNAME", obj.BRANCHNAME, DbType.String); //p.Add("@PAYERID", obj.PAYERID, DbType.String); //p.Add("@VALUEGRANTED", obj.VALUEGRANTED, DbType.String); // p.Add("@RECONCILE", obj.RECONCILE, DbType.Int32); p.Add("@BATCHID", null, DbType.String); p.Add("USERID", userId, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); p.Add("POSTTYPE", postType, DbType.Int16); p.Add("POSTSEQUENCE", obj.POSTSEQUENCE, DbType.Int32); using (var con = new RepoBase().OpenConnection(null)) { var rst = con.Execute("SESS_POST_SETRECON", p, commandType: CommandType.StoredProcedure); return(rst); } }
public int PostSetReconUploadBulk(List <SetReconUpldObj> objList, string userId) { var curDate = DateTime.Now; //OutPutObj ret = new OutPutObj(); var cnt = 0; var p = new DynamicParameters(); using (var con = new RepoBase().OpenConnection(null)) { //PURGE ALL RECORD FOR CURRENT USER int sqn = 0; p.Add("@USERID", userId, DbType.String); var rst = con.Execute("SESS_PURGE_SETRECON", p, commandType: CommandType.StoredProcedure); foreach (var obj in objList) { p.Add("@PID", obj.PID, DbType.String); p.Add("@PAYREFNO", obj.PAYREFNO, DbType.String); p.Add("@AMOUNT", obj.AMOUNT, DbType.Decimal); p.Add("@PAYMENTDATE", obj.PAYMENTDATE, DbType.DateTime); p.Add("@VALUEDATE", obj.VALUEDATE, DbType.DateTime); // p.Add("@RECEIPTNO", obj.RECEIPTNO, DbType.String); p.Add("@CUSTOMERNAME", obj.CUSTOMERNAME, DbType.String); p.Add("@PAYMENTMETHOD", obj.PAYMENTMETHOD, DbType.String); //p.Add("@TRANSACTIONSTATUS", obj.TRANSACTIONSTATUS, DbType.String); //p.Add("@DEPOSITSLIPNO", obj.DEPOSITSLIPNO, DbType.String); p.Add("@BANKNAME", obj.BANKNAME, DbType.String); //p.Add("@BRANCHNAME", obj.BRANCHNAME, DbType.String); //p.Add("@PAYERID", obj.PAYERID, DbType.String); //p.Add("@VALUEGRANTED", obj.VALUEGRANTED, DbType.String); //p.Add("@RECONCILE", obj.RECONCILE, DbType.Int32); p.Add("@BATCHID", null, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); p.Add("POSTTYPE", 1, DbType.Int16); p.Add("PostSequence", sqn++, DbType.Int32); cnt += con.Execute("SESS_POST_SETRECON", p, commandType: CommandType.StoredProcedure); } return(cnt); } }
public static int PostNapsBulk(List <NapsObj> objList, string userId) { var curDate = DateTime.Now; //OutPutObj ret = new OutPutObj(); var cnt = 0; var p = new DynamicParameters(); using (var con = new RepoBase().OpenConnection(null)) { //PURGE ALL RECORD FOR CURRENT USER int sqn = 0; p.Add("USERID", userId, DbType.String); var t2 = con.Execute("SESS_PURGE_NAPS", p, commandType: CommandType.StoredProcedure); foreach (var obj in objList) { ValidateUpload(obj); 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("REASON", obj.REASON, DbType.String); p.Add("REQUESTTYPE", obj.REQUESTTYPE, DbType.String); p.Add("USERID", userId, DbType.String); p.Add("CREATEDATE", obj.CREATEDATE, DbType.DateTime); p.Add("BATCHID", obj.BATCHID, DbType.String); p.Add("PID", obj.PID, DbType.String); p.Add("POSTTYPE", 1, DbType.String); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.Boolean); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); p.Add("PostSequence", sqn++, DbType.Int32); p.Add("EVENTTYPE", obj.EVENTTYPE, DbType.String); p.Add("MERCHANTID", obj.MERCHANTID, DbType.String); cnt += con.Execute("SESS_POST_NAPS", p, commandType: CommandType.StoredProcedure); } return(cnt); } }
public int PostMerchantUpload(MerchantUpldObj obj, int postType, string userId) { //OutPutObj ret = new OutPutObj(); var p = new DynamicParameters(); p.Add("@PID", obj.PID, DbType.String); p.Add("@MERCHANTID", obj.MERCHANTID, DbType.String); p.Add("@MERCHANTNAME", obj.MERCHANTNAME, DbType.String); p.Add("@CONTACTTITLE", obj.CONTACTTITLE, DbType.String); p.Add("@CONTACTNAME", obj.CONTACTNAME, DbType.String); p.Add("@MOBILEPHONE", obj.MOBILEPHONE, DbType.String); p.Add("@EMAIL", obj.EMAIL, DbType.String); p.Add("@EMAILALERTS", obj.EMAILALERTS, DbType.String); p.Add("@PHYSICALADDR", obj.PHYSICALADDR, DbType.String); p.Add("@TERMINALMODELCODE", obj.TERMINALMODELCODE, DbType.String); p.Add("@TERMINALID", obj.TERMINALID, DbType.String); p.Add("@BANKCODE", obj.BANKCODE, DbType.String); p.Add("@BANKACCNO", obj.BANKACCNO, DbType.String); p.Add("@BANKTYPE", obj.BANKTYPE, DbType.Int32); p.Add("@SLIPHEADER", obj.SLIPHEADER, DbType.String); p.Add("@SLIPFOOTER", obj.SLIPFOOTER, DbType.String); p.Add("@BUISNESSOCCUPATIONCODE", obj.BUISNESSOCCUPATIONCODE, DbType.String); p.Add("@MERCHANTCATEGORYCODE", obj.MERCHANTCATEGORYCODE, DbType.String); p.Add("@STATECODE", obj.STATECODE, DbType.String); p.Add("@VISAACQUIRERID", obj.VISAACQUIRERID, DbType.String); p.Add("@VERVEACQUIRERID", obj.VERVEACQUIRERID, DbType.String); p.Add("@MASTERCARDACQUIRERID", obj.MASTERCARDACQUIRERID, DbType.String); p.Add("@TERMINALOWNERCODE", obj.TERMINALOWNERCODE, DbType.String); p.Add("@LGA_LCDA", obj.LGA_LCDA, DbType.String); p.Add("@BANK_URL", obj.BANK_URL, DbType.String); p.Add("@ACCOUNTNAME", obj.ACCOUNTNAME, DbType.String); p.Add("@PTSP", obj.PTSP, DbType.String); p.Add("@BATCHID", null, DbType.String); p.Add("@USERID", userId, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); p.Add("@INTERFACE_FORMAT", null, DbType.String); p.Add("@SERVICETYPE", null, DbType.String); p.Add("@GROUPLABEL", null, DbType.Int32); p.Add("@ROWCOLOR", null, DbType.String); p.Add("@PAYATTITUDE_ACCEPTANCE", null, DbType.String); p.Add("@TRANSCURRENCY", obj.TRANSCURRENCY, DbType.String); p.Add("@PTSA", obj.PTSA, 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("POSTTYPE", postType, DbType.Int16); using (var con = new RepoBase().OpenConnection(null)) { var rst = con.Execute("SESS_POST_MERCHANTUPLD", p, commandType: CommandType.StoredProcedure); return(rst); } }
//public int DeleteDataBinUpload(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.Execute("DELETE_REVENUEHEAD_SESSION", p, commandType: CommandType.StoredProcedure); // return ret; // } //} //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; // } //} public int PurgeDataBinUpload(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.Execute("SESS_PURGE_DATABINUPLD", p, commandType: CommandType.StoredProcedure); return(ret); } }
public int PurgeRevenueHead(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.Execute("PURGE_REVENUEHEAD_SESSION", p, commandType: CommandType.StoredProcedure); return(ret); } }
public int PurgeRouteOfficer(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.Execute("SESS_PURGE_APPROVALOFFICER", p, commandType: CommandType.StoredProcedure); return(ret); } }
public int PurgeMerchantAcct(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.Execute("SESS_PURGE_MERCHANTACCT", p, commandType: CommandType.StoredProcedure); return(ret); } }
public int DeleteSharingParty(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.Execute("SESS_DELETE_SHARINGPARTY", p, commandType: CommandType.StoredProcedure); return(ret); } }
public int PostBinUploadBulk(List <DataBinUpldObj> objList, string userId) { var curDate = DateTime.Now; //OutPutObj ret = new OutPutObj(); var cnt = 0; var p = new DynamicParameters(); using (var con = new RepoBase().OpenConnection(null)) { //PURGE ALL RECORD FOR CURRENT USER int sqn = 0; p.Add("@USERID", userId, DbType.String); var rst = con.Execute("SESS_PURGE_DATABINUPLD", p, commandType: CommandType.StoredProcedure); foreach (var obj in objList) { p.Add("@PID", obj.PID, DbType.String); p.Add("@BANKFIID", obj.BANKFIID, DbType.String); p.Add("@BIN", obj.BIN, DbType.String); p.Add("@BUSINESSTYPE", obj.BUSINESSTYPE, DbType.String); p.Add("@CARDSCHEME", obj.CARDSCHEME, DbType.String); p.Add("@CBNCODE", obj.CBNCODE, DbType.String); p.Add("@COUNTRYCODE", obj.COUNTRYCODE, DbType.String); p.Add("@CURRENCYCODE", obj.CURRENCYCODE, DbType.String); p.Add("@ISSUERFIID", obj.ISSUERFIID, DbType.String); p.Add("@BATCHID", null, DbType.String); p.Add("USERID", userId, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); p.Add("POSTTYPE", 1, DbType.Int16); p.Add("PostSequence", sqn++, DbType.Int32); cnt += con.Execute("SESS_POST_DATABINUPLD", p, commandType: CommandType.StoredProcedure); } return(cnt); } }
public int PurgeRevenueHeadParty(string userId, string rvCode) { //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.Execute("Purge_RevenueHeadParty_Sess", p, commandType: CommandType.StoredProcedure); return(ret); } }
public int PostRvHeadUploadBulk(List <RvHeadUpldObj> objList, string userId) { var curDate = DateTime.Now; //OutPutObj ret = new OutPutObj(); var cnt = 0; var p = new DynamicParameters(); using (var con = new RepoBase().OpenConnection(null)) { //PURGE ALL RECORD FOR CURRENT USER int sqn = 0; p.Add("@USERID", userId, DbType.String); var rst = con.Execute("SESS_PURGE_RVHEADUPLD", p, commandType: CommandType.StoredProcedure); foreach (var obj in objList) { p.Add("@ID", obj.PID, DbType.String); p.Add("@RVCODE", obj.RVCODE, DbType.String); p.Add("@GROUPCODE", obj.GROUPCODE, DbType.String); p.Add("@DESCRIPTION", obj.DESCRIPTION, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); //p.Add("USERID", userId, DbType.String); p.Add("@STATUS", obj.STATUS, DbType.String); p.Add("@PAYMENTITEMID", obj.PAYMENTITEMID, DbType.Int32); p.Add("@BANKCODE", obj.BANKCODE, DbType.String); p.Add("@BANKACCOUNT", obj.BANKACCOUNT, DbType.String); p.Add("@SETTLEMENT_FREQUENCY", obj.SETTLEMENT_FREQUENCY, DbType.Int32); p.Add("@POSTTYPE", 1, DbType.Int16); 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); p.Add("@ACCOUNT_ID", obj.ACCOUNT_ID, DbType.Decimal); cnt += con.Execute("SESS_POST_RVHEADUPLD", p, commandType: CommandType.StoredProcedure); } return(cnt); } }
public int PostRvDrAcctUploadBulk(List <RvDrAcctUpldObj> objList, string userId) { var curDate = DateTime.Now; //OutPutObj ret = new OutPutObj(); var cnt = 0; var p = new DynamicParameters(); using (var con = new RepoBase().OpenConnection(null)) { //PURGE ALL RECORD FOR CURRENT USER int sqn = 0; p.Add("@USERID", userId, DbType.String); var rst = con.Execute("SESS_PURGE_RVDRACCTUPLD", p, commandType: CommandType.StoredProcedure); foreach (var obj in objList) { p.Add("@PID", obj.PID, DbType.String); p.Add("@GROUPCODE", obj.RVGROUPCODE, DbType.String); p.Add("@MERCHANTID", obj.MERCHANTID, DbType.String); p.Add("@AGENTCODE", obj.AGENT_CODE, DbType.String); p.Add("@BANKACCTNAME", obj.BANKACCTNAME, DbType.String); p.Add("@BANKACCTNO", obj.BANKACCTNO, DbType.String); p.Add("@BANKCODE", obj.BANKCODE, DbType.String); p.Add("USERID", userId, DbType.String); p.Add("STATUS", obj.STATUS, DbType.String); p.Add("@CREATEDATE", DateTime.Now, DbType.DateTime); p.Add("@VALIDATIONERRORMESSAGE", obj.VALIDATIONERRORMESSAGE, DbType.String); p.Add("@VALIDATIONERRORSTATUS", obj.VALIDATIONERRORSTATUS, DbType.String); p.Add("@WARNINGMESSAGE", obj.WARNINGMESSAGE, DbType.String); p.Add("POSTTYPE", 1, DbType.Int16); p.Add("PostSequence", sqn++, DbType.Int32); cnt += con.Execute("SESS_POST_RVDRACCTUPLD", p, commandType: CommandType.StoredProcedure); } return(cnt); } }
public static int PostNapsReprocess(decimal[] objList, string userId) { //OutPutObj ret = new OutPutObj(); var cnt = 0; var p = new DynamicParameters(); using (var con = new RepoBase().OpenConnection(null)) { //PURGE ALL RECORD FOR CURRENT USER foreach (var obj in objList) { p.Add("@P_ITBID", obj, DbType.Decimal); cnt += con.Execute("proc_PostNapsReprocess", p, commandType: CommandType.StoredProcedure); } return(cnt); } }
public static int PostAudit2(SM_AUDIT obj) { var p = new DynamicParameters(); p.Add("COLUMNNAME", obj.COLUMNNAME, DbType.String); p.Add("AUTHID", obj.AUTHID, DbType.String); p.Add("EVENTDATE", obj.EVENTDATE, DbType.DateTime); p.Add("EVENTTYPE", obj.EVENTTYPE, DbType.String); p.Add("INSTITUTION_ITBID", obj.INSTITUTION_ITBID, DbType.Int32); p.Add("NEWVALUE", obj.NEWVALUE, DbType.String); p.Add("ORIGINALVALUE", obj.ORIGINALVALUE, DbType.String); p.Add("RECORDID", obj.RECORDID, DbType.String); p.Add("TABLENAME", obj.TABLENAME, DbType.String); p.Add("USERID", obj.USERID, DbType.String); p.Add("IPADDRESS", SmartObj.getip(), DbType.String); using (var con = new RepoBase().OpenConnection(null)) { var TT = con.Execute("POST_AUDITTRAIL", p, commandType: CommandType.StoredProcedure); return(TT); } }
public static int PostAudit(object oldRecord, object newRecord, string postType, string userId, string authId, DateTime eventDate, string key, string tableName, int instId) { var cnt = 0; FieldInfo[] fieldsA; FieldInfo[] fieldsB; // newRecord.GetType().GetFields(); if (postType == "I") { if (newRecord == null) { return(0); } //var gh = newRecord.GetType().GetFields(); fieldsB = newRecord.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); using (var con = new RepoBase().OpenConnection(null)) { for (int i = 0; i < fieldsB.Length; i++) { var val = fieldsB[i].GetValue(newRecord); var name = fieldsB[i].Name; var p = new DynamicParameters(); p.Add("COLUMNNAME", name, DbType.String); p.Add("AUTHID", authId, DbType.String); p.Add("EVENTDATE", eventDate, DbType.DateTime); p.Add("EVENTTYPE", postType, DbType.String); p.Add("INSTITUTION_ITBID", instId, DbType.Int32); p.Add("NEWVALUE", val, DbType.String); p.Add("ORIGINALVALUE", null, DbType.String); p.Add("RECORDID", key, DbType.String); p.Add("TABLENAME", tableName, DbType.String); p.Add("USERID", userId, DbType.String); p.Add("IPADDRESS", SmartObj.getip(), DbType.String); cnt = con.Execute("POST_AUDITTRAIL", p, commandType: CommandType.StoredProcedure); } } } else if (postType == "M") { fieldsA = oldRecord.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); fieldsB = newRecord.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); using (var con = new RepoBase().OpenConnection(null)) { for (int i = 0; i < fieldsA.Length; i++) { object a = 1; object b = 1; if (a.Equals(b)) { object c = 2; } // var b = fieldsB[i].GetValue(newRecord); var newVal = fieldsB[i].GetValue(newRecord); var oldVal = fieldsA[i].GetValue(oldRecord); var name = fieldsB[i].Name; if ((oldVal != null && newVal != null && !oldVal.Equals(newVal)) || (oldVal == null && newVal != null) || (oldVal != null && newVal == null)) { //var tt1 = newVal.GetType(); //var tt2 = newVal.GetType(); var p = new DynamicParameters(); p.Add("COLUMNNAME", name, DbType.String); p.Add("AUTHID", authId, DbType.String); p.Add("EVENTDATE", eventDate, DbType.DateTime); p.Add("EVENTTYPE", postType, DbType.String); p.Add("INSTITUTION_ITBID", instId, DbType.Int32); p.Add("NEWVALUE", newVal, DbType.String); p.Add("ORIGINALVALUE", oldVal, DbType.String); p.Add("RECORDID", key, DbType.String); p.Add("TABLENAME", tableName, DbType.String); p.Add("USERID", userId, DbType.String); p.Add("IPADDRESS", SmartObj.getip(), DbType.String); cnt = con.Execute("POST_AUDITTRAIL", p, commandType: CommandType.StoredProcedure); } } } } return(cnt); }
public int PostMerchantUploadBulk(List <MerchantUpldObj> objList, string userId) { var curDate = DateTime.Now; //OutPutObj ret = new OutPutObj(); var cnt = 0; var p = new DynamicParameters(); using (var con = new RepoBase().OpenConnection(null)) { int?bankType = null; int?termCode = null; int bkType; //PURGE ALL RECORD FOR CURRENT USER int sqn = 0; p.Add("@USERID", userId, DbType.String); var rst = con.Execute("SESS_PURGE_MERCHANTUPLOAD", p, commandType: CommandType.StoredProcedure); foreach (var obj in objList) { if (int.TryParse(obj.BANKTYPE, out bkType)) { bankType = bkType; } if (int.TryParse(obj.TERMINALMODELCODE, out bkType)) { termCode = bkType; } p.Add("@PID", obj.PID, DbType.String); p.Add("@MERCHANTID", obj.MERCHANTID, DbType.String); p.Add("@MERCHANTNAME", obj.MERCHANTNAME, DbType.String); p.Add("@CONTACTTITLE", obj.CONTACTTITLE, DbType.String); p.Add("@CONTACTNAME", obj.CONTACTNAME, DbType.String); p.Add("@MOBILEPHONE", obj.MOBILEPHONE, DbType.String); p.Add("@EMAIL", obj.EMAIL, DbType.String); p.Add("@EMAILALERTS", obj.EMAILALERTS, DbType.String); p.Add("@PHYSICALADDR", obj.PHYSICALADDR, DbType.String); p.Add("@TERMINALMODELCODE", termCode, DbType.Decimal); p.Add("@TERMINALID", obj.TERMINALID, DbType.String); p.Add("@BANKCODE", obj.BANKCODE, DbType.String); p.Add("@BANKACCNO", obj.BANKACCNO, DbType.String); p.Add("@BANKTYPE", bankType, DbType.Int32); p.Add("@SLIPHEADER", obj.SLIPHEADER, DbType.String); p.Add("@SLIPFOOTER", obj.SLIPFOOTER, DbType.String); p.Add("@BUISNESSOCCUPATIONCODE", obj.BUISNESSOCCUPATIONCODE, DbType.String); p.Add("@MERCHANTCATEGORYCODE", obj.MERCHANTCATEGORYCODE, DbType.String); p.Add("@STATECODE", obj.STATECODE, DbType.String); p.Add("@VISAACQUIRERID", obj.VISAACQUIRERID, DbType.String); p.Add("@VERVEACQUIRERID", obj.VERVEACQUIRERID, DbType.String); p.Add("@MASTERCARDACQUIRERID", obj.MASTERCARDACQUIRERID, DbType.String); p.Add("@TERMINALOWNERCODE", obj.TERMINALOWNERCODE, DbType.String); p.Add("@LGA_LCDA", obj.LGA_LCDA, DbType.String); p.Add("@BANK_URL", obj.BANK_URL, DbType.String); p.Add("@ACCOUNTNAME", obj.ACCOUNTNAME, DbType.String); p.Add("@PTSP", obj.PTSP, DbType.String); p.Add("@BATCHID", null, DbType.String); p.Add("@USERID", userId, DbType.String); p.Add("@CREATEDATE", curDate, DbType.DateTime); p.Add("@INTERFACE_FORMAT", null, DbType.String); p.Add("@SERVICETYPE", null, DbType.String); p.Add("@GROUPLABEL", obj.GROUPLABEL, DbType.Int32); p.Add("@ROWCOLOR", obj.ROWCOLOR, DbType.String); p.Add("@PAYATTITUDE_ACCEPTANCE", null, DbType.String); p.Add("@TRANSCURRENCY", obj.TRANSCURRENCY, DbType.String); p.Add("@PTSA", obj.PTSA, 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("@POSTTYPE", 1, DbType.Int16); p.Add("@PostSequence", sqn++, DbType.Int32); cnt += con.Execute("SESS_POST_MERCHANTUPLD", p, commandType: CommandType.StoredProcedure); } return(cnt); } }
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); } }