public UserValResponse UserAuthentication(string UserId, string password)
        {
            UserValResponse rs = null;

            try
            {
                Generic.Dapper.localhost1.CoreBankProcess vv = new Generic.Dapper.localhost1.CoreBankProcess();
                var dd = vv.UserPasswordAuthLocal(UserId, password);
                if (dd != null)
                {
                    DataTable exDT = dd.Tables[0];
                    rs             = new UserValResponse();
                    rs.RespCode    = int.Parse(exDT.Rows[0][0].ToString());
                    rs.RespMessage = exDT.Rows[0][1].ToString();
                }


                return(rs);
            }
            catch (System.Net.WebException ex)
            {
                rs = new UserValResponse();
                // rs.ResponseCode = true;
                rs.RespCode    = -99;
                rs.RespMessage = "Connection to Core Banking System could not be established. Please contact System Administrator";
                return(rs);
            }
            catch (Exception ex)
            {
                rs             = new UserValResponse();
                rs.RespCode    = -99;
                rs.RespMessage = ex.Message; // "Connection to Core Banking System could not be established. Please contact System Administrator";
                return(rs);
            }
        }
        //public PostingResponse TransactionPosting(PostingRequest pr)
        //{
        //    PostingResponse rs = null;
        //    try
        //    {

        //        Generic.Dapper.localhost1.Service vv = new Generic.Dapper.localhost.Service();
        //        var dd = vv.TransactionPosting(pr.TransRefNo, pr.DrAcctNo, pr.CrAcctNo, pr.Narration, pr.TranCode, pr.ValueDate, pr.TranAmount);
        //        if (dd != null)
        //        {
        //            DataTable exDT = dd.Tables[0];
        //            rs = new PostingResponse();
        //            rs.ResponseCode = int.Parse(exDT.Rows[0][0].ToString());
        //            rs.ResponseMsg = exDT.Rows[0][1].ToString();
        //            //rs.nBalance = decimal.Parse(exDT.Rows[0][2].ToString());
        //            //rs.sName = exDT.Rows[0][3].ToString();
        //            //rs.sStatus = exDT.Rows[0][4].ToString();
        //            //rs.nBranch = exDT.Rows[0][5].ToString();
        //            //rs.sCrncyIso = exDT.Rows[0][6].ToString();
        //            //rs.sAddress = exDT.Rows[0][7].ToString(); ;
        //            //rs.sTransNature = exDT.Rows[0][8].ToString();
        //            //rs.sChequeStatus = exDT.Rows[0][9].ToString();
        //            //rs.sAccountType = exDT.Rows[0][10].ToString();
        //            //rs.sProductCode = exDT.Rows[0][11].ToString();
        //        }


        //        return rs;
        //    }
        //    catch (System.Net.WebException ex)
        //    {
        //        rs = new PostingResponse();
        //       // rs.ResponseCode = true;
        //        rs.ResponseCode = -99;
        //        rs.ResponseMsg = "Connection to Core Banking System could not be established. Please contact System Administrator";
        //        return rs;

        //    }
        //    catch(Exception ex)
        //    {
        //        rs = new PostingResponse();
        //        rs.ResponseCode = -99;
        //        rs.ResponseMsg = ex.Message; // "Connection to Core Banking System could not be established. Please contact System Administrator";
        //        return rs;
        //    }
        //}
        public UserValResponse UserValidation(string UserId)
        {
            UserValResponse rs = null;

            try
            {
                Generic.Dapper.localhost1.CoreBankProcess vv = new Generic.Dapper.localhost1.CoreBankProcess();
                var dd = vv.UserAuthLocal(UserId);
                if (dd != null)
                {
                    DataTable exDT = dd.Tables[0];
                    rs             = new UserValResponse();
                    rs.RespCode    = int.Parse(exDT.Rows[0][0].ToString());
                    rs.RespMessage = exDT.Rows[0][1].ToString();
                    rs.FullName    = exDT.Rows[0][2].ToString();
                    rs.DeptCode    = exDT.Rows[0][3].ToString();
                    rs.UserId      = exDT.Rows[0][4].ToString();
                    rs.BranchCode  = exDT.Rows[0][5].ToString();
                    rs.Email       = exDT.Rows[0][6].ToString();
                    rs.MobilePhone = exDT.Rows[0][7].ToString();
                    //rs.nBalance = decimal.Parse(exDT.Rows[0][2].ToString());
                    //rs.sName = exDT.Rows[0][3].ToString();
                    //rs.sStatus = exDT.Rows[0][4].ToString();
                    //rs.nBranch = exDT.Rows[0][5].ToString();
                    //rs.sCrncyIso = exDT.Rows[0][6].ToString();
                    //rs.sAddress = exDT.Rows[0][7].ToString(); ;
                    //rs.sTransNature = exDT.Rows[0][8].ToString();
                    //rs.sChequeStatus = exDT.Rows[0][9].ToString();
                    //rs.sAccountType = exDT.Rows[0][10].ToString();
                    //rs.sProductCode = exDT.Rows[0][11].ToString();
                }


                return(rs);
            }
            catch (System.Net.WebException ex)
            {
                rs = new UserValResponse();
                // rs.ResponseCode = true;
                rs.RespCode    = -99;
                rs.RespMessage = "Connection to Core Banking System could not be established. Please contact System Administrator";
                return(rs);
            }
            catch (Exception ex)
            {
                rs             = new UserValResponse();
                rs.RespCode    = -99;
                rs.RespMessage = ex.Message; // "Connection to Core Banking System could not be established. Please contact System Administrator";
                return(rs);
            }
        }