public async Task <List <MultiPayment> > WebGetGLCode(MultiPayment _multi)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[1];
                Parameters[0] = String.IsNullOrEmpty(_multi.SelectedAdjTxnCode) ? new SqlParameter("@TxnCd", DBNull.Value) : new SqlParameter("@TxnCd", _multi.SelectedAdjTxnCode);
                var execResult = await objDataEngine.ExecuteCommandAsync("WebGetGlCode", CommandType.StoredProcedure, Parameters);

                var _List = new List <MultiPayment>();
                while (execResult.Read())
                {
                    _List.Add(new MultiPayment
                    {
                        GLTxnCode   = Convert.ToString(execResult["AcctTxnCd"]),
                        GLDescp     = Convert.ToString(execResult["GLTxnDescp"]),
                        GLCodeDescp = Convert.ToString(execResult["Descp"])
                    });
                }
                return(_List);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Пример #2
0
        public async Task <ActionResult> GetDropDown()
        {
            var _Payment = new MultiPayment
            {
                TxnCode      = await BaseService.WebGetTxnCode("I", "PaymtTxnCategoryMapInd", "Y"),
                IssueingBank = await BaseService.GetRefLib("Bank")
            };

            return(Json(new { Selects = _Payment, Model = new MultiPayment() }, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        public async Task <ActionResult> GetDropDown()
        {
            var _Payment = new TxnAdjustment
            {
                TxnCode      = await BaseService.GetPymtTxnCd("Pymt", null),
                Owner        = (await UserAccessService.GetUserAccessListSelect()).RefLibLst,
                IssueingBank = await BaseService.GetRefLib("Bank"),
                PaymentType  = await BaseService.GetRefLib("TxnShortDesc", null, "10"),
                GLSettlement = await BaseService.GetRefLib("GLSettlement")
            };
            var multipayment = new MultiPayment();

            multipayment.ChequeAmt = "0";
            return(Json(new { Selects = _Payment, Model = multipayment }, JsonRequestBehavior.AllowGet));
        }
Пример #4
0
        public async Task <ActionResult> WebGetGLCode(jQueryDataTableParamModel Params, MultiPayment _multipayment)
        {
            var list = (await MultipleTxnOpService.GetGLCode(_multipayment.SelectedAdjTxnCode, _multipayment.AcctNo, null)).multiPayments;

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Пример #5
0
        public async Task <ActionResult> WebGetGLCode(jQueryDataTableParamModel Params, MultiPayment _multipayment)
        {
            var list = (await MultiPaymentOpService.WebGetGLCodeByTxnCd(_multipayment.SelectedTxnCode, _multipayment.SelectedGLSettlement, _multipayment.AcctNo)).multiPayments;

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Пример #6
0
        public async Task <JsonResult> WebMultiPaymentSelect(string BatchId, MultiPayment _MultiPymt)
        {
            var multipaymentSelectObj = (await MultiPaymentOpService.WebMultiPaymentSelect(BatchId, _MultiPymt)).multiPayment;

            return(Json(new { list = multipaymentSelectObj }, JsonRequestBehavior.AllowGet));
        }
Пример #7
0
        public async Task <MultiPayment> WebMultiPaymentSelect(string BatchId, MultiPayment _MultiPymt)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[4];
                Parameters[0] = new SqlParameter("@BatchId", BatchId);
                Parameters[1] = new SqlParameter("@IssNo", GetIssNo);
                Parameters[2] = String.IsNullOrEmpty(_MultiPymt.ChequeAmt) ? new SqlParameter("@TxnAmt", DBNull.Value) : new SqlParameter("@TxnAmt", SqlDbType.Decimal);
                Parameters[3] = String.IsNullOrEmpty(_MultiPymt.ChequeNo) ? new SqlParameter("@RefKey", DBNull.Value) : new SqlParameter("@RefKey", _MultiPymt.ChequeNo);// SqlDbType.VarChar, 12
                //Parameters[3].Direction = ParameterDirection.Output;

                var execResult = await objDataEngine.ExecuteCommandAsync("WebMultiPaymentSelect", CommandType.StoredProcedure, Parameters);

                var _Payment = new MultiPayment();
                var txnList  = new List <MultipleTxnRecord>();
                while (execResult.Read())
                {
                    _Payment.TxnId                = Convert.ToString(execResult["TxnId"]);
                    _Payment.TxnDate              = DateConverter(execResult["TxnDate"]);
                    _Payment.DueDate              = DateConverter(execResult["DueDate"]);
                    _Payment.RefNo                = Convert.ToString(execResult["RefNo"]);
                    _Payment.SelectedTxnCode      = Convert.ToString(execResult["TxnCd"]);
                    _Payment.ChequeNo             = Convert.ToString(execResult["ChequeNo"]);
                    _Payment.ChequeAmt            = ConverterDecimal(execResult["ChequeAmt"]);
                    _Payment.CreationDate         = DateConverter(execResult["CreationDate"]);
                    _Payment.SelectedOwner        = Convert.ToString(execResult["Owner"]);
                    _Payment.SelectedIssueingBank = Convert.ToString(execResult["IssuingBank"]);
                    _Payment.SlipNo               = Convert.ToString(execResult["SlipNo"]);
                    _Payment.SelectedSts          = Convert.ToString(execResult["Sts"]);
                    _Payment.SelectedPaymentType  = Convert.ToString(execResult["PymtType"]);
                    _Payment.SelectedGLSettlement = Convert.ToString(execResult["SettleVal"]);
                    txnList.Add(new MultipleTxnRecord
                    {
                        AcctNo = ConvertInt(execResult["AcctNo"]),
                        //CardNo = Convert.ToString(execResult["CardNo"]),
                        TxnAmt = ConverterDecimal(execResult["TxnAmt"]),
                        //BookingDate = DateConverter(execResult["BookingDate"]),
                        //Pts = Convert.ToString(execResult["Pts"]),
                        TxnDescp = Convert.ToString(execResult["Descp"]),
                        //AppvCd = Convert.ToString(execResult["AppvCd"]),
                        SelectedSts = Convert.ToString(execResult["Sts"]),
                        //WithHeldUnsettleId = Convert.ToString(execResult["WithheldUnsettleId"]),
                        ChequeNo      = Convert.ToString(execResult["ChequeNo"]),
                        CreationDate  = DateConverter(execResult["CreationDate"]),
                        SelectedOwner = Convert.ToString(execResult["Owner"]),
                        TxnId         = Convert.ToString(execResult["TxnId"]),
                        AcctName      = Convert.ToString(execResult["AccountName"])
                    });
                }
                if (txnList.Any())
                {
                    _Payment.MultipleTxnRecord = txnList;
                }
                return(_Payment);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Пример #8
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   Mar 5, 2017
        *  Function:     WebMultiPaymentSelect
        *  Purpose:      WebMultiPaymentSelect
        *  Inputs:       batchId,MultiPaymentDTO
        *  Returns:      MultiPaymentResponse
        *************************************/
        public async Task <MultiPaymentResponse> WebMultiPaymentSelect(string batchId, MultiPayment multiPayment)
        {
            Logger.Info("Invoking WebMultiPaymentSelect function");
            var response = new MultiPaymentResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var multiPaymentOpDAO = scope.Resolve <IMultiPaymentOpDAO>();
                    var multi             = Mapper.Map <MultiPayment, MultiPaymentDTO>(multiPayment);
                    var result            = await multiPaymentOpDAO.WebMultiPaymentSelect(batchId, multi);

                    var             txnList       = new List <MultipleTxnRecordDTO>();
                    MultiPaymentDTO multilPayment = new MultiPaymentDTO();
                    if (result.Count() > 0)
                    {
                        foreach (var item in result)
                        {
                            MultipleTxnRecordDTO multipleTxtRecord = new MultipleTxnRecordDTO();
                            multipleTxtRecord.AcctNo        = Convert.ToInt32(item.AcctNo.ToString());
                            multipleTxtRecord.TxnAmt        = Convert.ToString(decimal.Round(item.TxnAmt, 2, MidpointRounding.AwayFromZero));
                            multipleTxtRecord.TxnDescp      = item.Descp;
                            multipleTxtRecord.SelectedSts   = item.Sts;
                            multipleTxtRecord.ChequeNo      = Convert.ToString(item.ChequeNo);
                            multipleTxtRecord.CreationDate  = CardTrend.Common.Extensions.NumberExtensions.DateConverter(item.CreationDate);
                            multipleTxtRecord.SelectedOwner = item.Owner;
                            multipleTxtRecord.TxnId         = item.TxnId;
                            multipleTxtRecord.AcctName      = item.AccountName;
                            txnList.Add(multipleTxtRecord);
                            //-----------
                            multilPayment.TxnId        = item.TxnId;
                            multilPayment.TxnDate      = item.TxnDate;
                            multilPayment.DueDate      = item.DueDate;
                            multilPayment.RefNo        = item.RefNo;
                            multilPayment.TxnCd        = item.TxnCd;
                            multilPayment.TxnCdDescp   = Convert.ToString(item.TxnCd);
                            multilPayment.ChequeNo     = item.ChequeNo;
                            multilPayment.ChequeAmt    = item.ChequeAmt;
                            multilPayment.CreationDate = item.CreationDate;
                            multilPayment.Owner        = item.Owner;
                            multilPayment.IssuingBank  = item.IssuingBank;
                            multilPayment.SlipNo       = item.SlipNo;
                            multilPayment.Sts          = item.Sts;
                            multilPayment.PymtType     = item.PymtType;
                            multilPayment.SettleVal    = item.SettleVal;
                        }
                    }
                    multilPayment.MultipleTxnRecordList = txnList;
                    response.multiPayment = Mapper.Map <MultiPaymentDTO, MultiPayment>(multilPayment);
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in WebMultiPaymentSelect: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Пример #9
0
 public MultiPaymentResponse()
 {
     multiPayment  = new MultiPayment();
     multiPayments = new List <MultiPayment>();
 }
        public async Task <ActionResult> WebGetGLCode(jQueryDataTableParamModel Params, MultiPayment _multipayment)
        {
            var list = (await MerchMultitxnAdjustmentService.GetGLCodes(_multipayment.SelectedAdjTxnCode)).multiPaymentGLCodes;

            return(Json(list, JsonRequestBehavior.AllowGet));
        }