Exemple #1
0
        /// <summary>
        /// This Method use to get list and details of complaints submitted by users.
        /// </summary>
        /// <param name="cardholderId">Id of logged in user</param>
        /// <param name="SkipCount">The skip count.</param>
        /// <param name="PageSize">Size of the page.</param>
        /// <param name="RecordCount">The record count.</param>
        /// <returns>List of complaints</returns>
        /// <remarks></remarks>

        public List <CH_Complaint_DtlDTO> getComplaintsDetails(long cardholderId, int SkipCount, int PageSize, ref int RecordCount)
        {
            // RecodeCount = repCH_Complaint_Dtl.GetAll().Count();

            IRepository <CH_ComplaintType_Mst> cht = ObjectFactory.GetInstance <IRepository <CH_ComplaintType_Mst> >();
            List <CH_Complaint_DtlDTO>         lst = new List <CH_Complaint_DtlDTO>();

            CardHolderManager chm = new CardHolderManager();

            lst = (from x in repCH_Complaint_Dtl.GetAll()
                   join y in chm.repCardHolder_Mst.GetQuery()
                   on x.CardHolder_Id equals y.CardHolder_Id
                   join a in cht.GetAll()
                   on x.ComplaintType_Id equals a.ComplaintType_Id
                   where cardholderId == y.CardHolder_Id
                   select new CH_Complaint_DtlDTO()
            {
                Complaint_Dtl_Id = x.Complaint_Dtl_Id,
                Complaint_Dt = x.Complaint_Dt,
                CardHolder_Id = x.CardHolder_Id,
                ComplaintType_Id = x.ComplaintType_Id,
                ComplaintType = a.ComplaintType_nm,
                Remarks = x.Remarks,
                Complaint_Status = x.Complaint_Status,
                UID = x.UID,
                AdminRemarks = x.AdminRemarks
            }).OrderByDescending(t => t.Complaint_Dt).ToList();

            RecordCount = lst.Count();
            lst         = lst.Skip(SkipCount).Take(PageSize).ToList();
            return(lst);
        }
Exemple #2
0
        /// <summary>
        /// Updates the card holder payment status.
        /// </summary>
        /// <param name="transaction_number">The transaction_number.</param>
        /// <param name="accountNumber">The account number.</param>
        /// <param name="amountDue">The amount due.</param>
        /// <param name="TxnRefrenceNo">The TXN refrence no.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public string UpdateCardHolderPaymentStatus(string transaction_number, string BillDeskOnlineID, double amountDue, string TxnRefrenceNo,
                                                    string paymentStatus, string BankRefNo, string BankId, string AuthStatus) // Add BillDeskOnlineID instead of Accnum 20-jan-2015
        {
            //commented by abhijeet on 21/08/2019
            //string Transaction_number = "";
            //CH_PaymentStatus_Dtl obj = repCardHolderPaymentStatus.SingleOrDefault(c => c.BillDeskOnlineID == BillDeskOnlineID
            //                            && c.Transaction_number == transaction_number
            //                            && c.AmountDue == amountDue && c.PaymentStatus.Trim().ToLower() == "unsuccessful");
            //if (obj != null)
            //{
            //    obj.PaymentStatus = paymentStatus;
            //    obj.TxnReferenceNo = TxnRefrenceNo;
            //    obj.Updated_by = CardHolderManager.GetLoggedInUser().CardHolder_Id;
            //    obj.Updated_dt = DateTime.Now;
            //    obj.BankRefNo = BankRefNo;
            //    obj.BankId = BankId;
            //    obj.AuthStatus = AuthStatus;
            //    GeneralManager.Commit();
            //    Transaction_number = obj.Transaction_number;
            //}
            //return Transaction_number;

            //Added by abhijeet on 21/08/2019
            BOBCardEntities _db = new BOBCardEntities();

            _db.UpdatePaymentStatus_Dtl(BillDeskOnlineID, transaction_number, amountDue, paymentStatus, TxnRefrenceNo,
                                        CardHolderManager.GetLoggedInUser().CardHolder_Id, DateTime.Now, BankRefNo, BankId, AuthStatus);
            return(transaction_number);
        }
        /// <summary>
        /// Authenticates the user.
        /// </summary>
        /// <param name="Username">The username.</param>
        /// <param name="PublicIP">The public IP.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public CardHolder_MstDTO AuthenticateUser(string Username, string PublicIP = "")
        {
            //var users = repCardHolder_Mst.Find(u => u.User_nm == Username).Select(u => new CardHolder_MstDTO()
            //{
            //    CardHolder_Id = u.CardHolder_Id,
            //    User_nm = u.User_nm,
            //    User_pwd = u.User_pwd,
            //    Created_dt = u.Created_dt,
            //    Updated_dt = u.Updated_dt,
            //    IP_Address = u.IP_Address,
            //    Personal_Msg = u.Personal_Msg,
            //    IsActive = u.IsActive,
            //    IsPermanentDisable = u.IsPermanentDisable,
            //    //IsLoggedInCurrently = u.IsLoggedInCurrently,
            //    Oracle_Customer_Id = u.Oracle_Customer_Id,
            //    credit_card_number = u.credit_card_number,
            //    creditcard_acc_number = u.creditcard_acc_number,
            //    CurrentLoginDate = u.CurrentLoginDate,
            //    LastLoginDate = u.LastLoginDate,
            //    LocalIP_Address = u.Local_IpAddress
            //}).ToList();

            var Objusers = new CardHolder_MstDTO();

            //if (users.Count < 2)
            //    Objusers = users.SingleOrDefault();
            //else
            //    Objusers = users.First();

            if (true) //Objusers != null
            {
                //var obj = repCardHolder_Mst.SingleOrDefault(c => c.User_nm == Username && c.IsActive == true && c.IsPermanentDisable == false);
                CardHolderManager _objManager = new CardHolderManager();
                var obj = _objManager.FindActiveUser(Username);
                //var obj = repCardHolder_Mst.Find .SingleOrDefault(c => c.User_nm == Username && c.IsActive == true && c.IsPermanentDisable == false);
                if (obj != null)
                {
                    Objusers = obj;
                    //if (obj.CurrentLoginDate.HasValue)
                    //{
                    //    obj.LastLoginDate = obj.CurrentLoginDate;
                    //}
                    //obj.CurrentLoginDate = DateTime.Now;

                    //IPAddress localAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork);

                    //if (localAddress != null)
                    //    obj.LocalIP_Address = Convert.ToString(localAddress);


                    //if (PublicIP != "")
                    //    Objusers.IP_Address = PublicIP;
                    //GeneralManager.Commit();
                }
            }
            return(Objusers);
        }
        /// <summary>
        /// This method is used for getting card details for Auto Debit Payment Type
        /// </summary>
        /// <param name="cDto">cDto</param>
        /// <returns>CH_CardDTO</returns>
        public long GetRequestTypeId(string requestTypeName)
        {
            IQueryable <CH_RequestType_Mst> repCH_RequestType_Dtl = ObjectFactory.GetInstance <IRepository <CH_RequestType_Mst> >().GetQuery();
            /// Step 1 Join CH Requests And CH
            CardHolderManager chm = new CardHolderManager();
            var requestTypeId     = (from a in repCH_RequestType_Dtl
                                     where a.RequestType_nm == requestTypeName
                                     select a).FirstOrDefault();

            return(requestTypeId.RequestType_Id);
        }
Exemple #5
0
        /// <summary>
        /// Updates the card holder payment status bobibanking.
        /// </summary>
        /// <param name="prn">The PRN.</param>
        /// <param name="accountNumber">The account number.</param>
        /// <param name="amountDue">The amount due.</param>
        /// <param name="bid">The bid.</param>
        /// <param name="debtAccountNo">The debt account no.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public string UpdateCardHolderPaymentStatusBobibanking(string prn, string accountNumber, double amountDue, string PID, string bid,
                                                               string debtAccountNo, string status)
        {
            //commented by abhijeet on 21/08/2019
            //string Transaction_number = "";
            //CH_BobibankingPaymentStatus_Dtl obj = repCardHolderBobibankingPaymentStatus.SingleOrDefault(c => c.Creditcard_acc_number == accountNumber
            //                                      && c.PRN == prn && c.AmountDue == amountDue && c.PaymentStatus.Trim() == "unsuccessful");
            //if (obj != null)
            //{
            //    obj.PaymentStatus = status;
            //    obj.BID = bid;
            //    obj.DebtAccountNo = debtAccountNo;
            //    obj.Updated_by = CardHolderManager.GetLoggedInUser().CardHolder_Id;
            //    obj.Updated_dt = DateTime.Now;
            //    GeneralManager.Commit();
            //    Transaction_number = obj.PRN;
            //}
            //return Transaction_number;
            BOBCardEntities _db = new BOBCardEntities();

            _db.Update_BobibankingPaymentStatus_Dtl(accountNumber, prn, amountDue, status, bid, debtAccountNo, DateTime.Now, CardHolderManager.GetLoggedInUser().CardHolder_Id.ToString());
            return(prn);
        }
 //public IRepository<CH_Sessions_Dtl> repCHSessionDtl
 //{
 //    get
 //    {
 //        return ObjectFactory.GetInstance<IRepository<CH_Sessions_Dtl>>();
 //    }
 //}
 /// <summary>
 /// Updates the card holder.
 /// </summary>
 /// <param name="userDTO">The user DTO.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public string UpdateCardHolder(CardHolder_MstDTO userDTO)
 {
     try
     {
         //commented by Avani on 21-08-2019
         //IPAddress localAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork);
         //CardHolder_Mst user = repCardHolder_Mst.SingleOrDefault(u => u.CardHolder_Id == userDTO.CardHolder_Id);
         //user.User_pwd = userDTO.User_pwd;
         //user.Local_IpAddress = Convert.ToString(localAddress);
         //user.Updated_by = CardHolderManager.GetLoggedInUser().CardHolder_Id;
         //user.Updated_dt = DateTime.Now;
         //GeneralManager.Commit();
         //return "0";
         /***/
         // Added by Avani on 21-08-2019
         BOBCardEntities _db          = new BOBCardEntities();
         IPAddress       localAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork);
         _db.UpdateCardHolderPasswordDetail(userDTO.CardHolder_Id, userDTO.User_pwd, localAddress.ToString(), CardHolderManager.GetLoggedInUser().CardHolder_Id, DateTime.Now);
         return("0");
     }
     catch (Exception exp)
     {
         return(Constants.GeneralErrorMessage);
     }
 }