コード例 #1
0
        public string AproveOrRejectCommissionEntry(CommissionMobile item, string entryBy)
        {
            try
            {
                using (var connection = this.GetConnection())
                {
                    var parameter = new OracleDynamicParameters();
                    parameter.Add("V_TRANS_NO", OracleDbType.Double, ParameterDirection.InputOutput, Convert.ToDouble(item.TransNo));
                    parameter.Add("V_TO_PHONE", OracleDbType.Varchar2, ParameterDirection.Input, item.Mphone);
                    parameter.Add("V_MSG_AMT", OracleDbType.Double, ParameterDirection.Input, item.Amount);
                    parameter.Add("MSGID", OracleDbType.Varchar2, ParameterDirection.Input, "999999999");
                    parameter.Add("V_FLAG", OracleDbType.Double, ParameterDirection.Output);
                    parameter.Add("OUTMSG", OracleDbType.Varchar2, ParameterDirection.Output, null, 32767);
                    parameter.Add("V_CHECKED_USER", OracleDbType.Varchar2, ParameterDirection.Input, entryBy);

                    SqlMapper.Query <dynamic>(connection, mainDbUser.DbUser + "PROC_DISBURSE_COMMISSION", param: parameter, commandType: CommandType.StoredProcedure);
                    connection.Close();
                    string flag = parameter.oracleParameters[4].Value != null ? parameter.oracleParameters[4].Value.ToString() : null;
                    string successOrErrorMsg = null;
                    if (flag == "0")
                    {
                        successOrErrorMsg = parameter.oracleParameters[5].Value != null ? parameter.oracleParameters[5].Value.ToString() : null;
                    }
                    else
                    {
                        successOrErrorMsg = flag;
                    }
                    return(successOrErrorMsg);
                }
            }
            catch (Exception e)
            {
                throw;
            }
        }
コード例 #2
0
        public void UpdateCommissionEntry(CommissionMobile item, string entryBy)
        {
            try
            {
                using (var connection = this.GetConnection())
                {
                    var    parameter = new OracleDynamicParameters();
                    string query     = @"Update " + mainDbUser.DbUser + "COMMISSION_POSTING_NEW set status='R', CHECK_USER='******', CHECK_DATE=SYSDATE where Trans_no=" + "'" + item.TransNo + "'";

                    var result = connection.Query <dynamic>(query).FirstOrDefault();
                    connection.Close();

                    //return result;
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
コード例 #3
0
        public void SaveCommissionEntry(CommissionMobile item, string entryBy, string toCatId, string fromCatId, string entrybrCode, string transNo)
        {
            try
            {
                using (var connection = this.GetConnection())
                {
                    var    parameter = new OracleDynamicParameters();
                    string query     = @"insert into " + mainDbUser.DbUser + "COMMISSION_POSTING_NEW (Trans_no,Trans_to,To_cat_id,Status,msg_amt,entry_user,Entry_br_code,From_cat_id) values (" + "'" + transNo + "'," + "'" + item.Mphone + "'," + "'" + toCatId + "','M'," + "'" + item.Amount + "'," + "'" + entryBy + "'," + "'" + entrybrCode + "','" + fromCatId + "')";

                    var result = connection.Query <dynamic>(query).ToList();
                    connection.Close();

                    //return result;
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
コード例 #4
0
 public string AproveOrRejectCommissionEntry(CommissionMobile item, string entryBy)
 {
     return(_FundTransferRepository.AproveOrRejectCommissionEntry(item, entryBy));
 }
コード例 #5
0
 public void UpdateCommissionEntry(CommissionMobile item, string entryBy)
 {
     _FundTransferRepository.UpdateCommissionEntry(item, entryBy);
 }
コード例 #6
0
 public void SaveCommissionEntry(CommissionMobile item, string entryBy, string toCatId, string fromCatId, string entrybrCode, string transNo)
 {
     _FundTransferRepository.SaveCommissionEntry(item, entryBy, toCatId, fromCatId, entrybrCode, transNo);
 }