Exemplo n.º 1
0
        public static void ReceCost(string CommunityId, string out_trade_no)
        {
            string ConnStr = GetConnection(CommunityId);

            //公司数据库连接字符串
            Global_Var.CorpSQLConnstr = ConnStr;
            //查询账单信息
            IDbConnection     conn    = new SqlConnection(ConnStr);
            string            query   = "SELECT * FROM Tb_OL_AliPayOrder WHERE out_trade_no=@out_trade_no";
            Tb_OL_AlipayOrder T_Order = conn.Query <Tb_OL_AlipayOrder>(query, new { out_trade_no = out_trade_no }).SingleOrDefault();

            query = "SELECT * FROM Tb_OL_AliPayDetail_Prec WHERE PayOrderId=@PayOrderId";
            Tb_OL_AliPayDetail_Prec T_Prec = conn.Query <Tb_OL_AliPayDetail_Prec>(query, new { PayOrderId = T_Order.Id.ToString() }).SingleOrDefault();

            //预存收款
            string  strUserCode = "_Sys_";
            string  Result      = "";
            string  ErrorMsg    = "";
            long    iReceID     = 0;
            decimal PrecAmount  = Convert.ToDecimal(T_Prec.DueAmount);

            ReceFeesPrec.ReceivePrecFees(AppGlobal.StrToInt(T_Order.CommID.ToString()), T_Order.CustId, T_Prec.RoomID, T_Prec.CostId.ToString(), "自助缴费", PrecAmount, strUserCode, ref Result, ref ErrorMsg, ref iReceID);

            //更新账单信息
            T_Order.IsSucc = 1;
            conn.Update(T_Order);

            T_Prec.PaidAmount = T_Prec.DueAmount;
            conn.Update(T_Prec);
        }
Exemplo n.º 2
0
        public static void ReceCost(string CommunityId, string out_trade_no)
        {
            IDbConnection conn  = new SqlConnection(PubConstant.UnifiedContionString.ToString());
            string        query = "SELECT * FROM Tb_Community WHERE Id=@id";
            var           T     = conn.Query <Tb_Community>(query, new { id = CommunityId }).FirstOrDefault();

            if (T != null)
            {
                PubConstant.hmWyglConnectionString = GetConnectionStr(T);
                Global_Var.CorpSQLConnstr          = PubConstant.hmWyglConnectionString;
            }
            conn.Dispose();
            //公司数据库连接字符串

            //查询账单信息
            conn  = new SqlConnection(PubConstant.hmWyglConnectionString);
            query = "SELECT * FROM Tb_OL_AliPayOrder WHERE out_trade_no=@out_trade_no";
            Tb_OL_AlipayOrder T_Order = conn.Query <Tb_OL_AlipayOrder>(query, new { out_trade_no = out_trade_no }).SingleOrDefault();

            query = "SELECT * FROM Tb_OL_AliPayDetail_Prec WHERE PayOrderId=@PayOrderId";
            Tb_OL_AliPayDetail_Prec T_Prec = conn.Query <Tb_OL_AliPayDetail_Prec>(query, new { PayOrderId = T_Order.Id.ToString() }).SingleOrDefault();

            //预存收款
            string strUserCode = "_Sys_";
            string Result      = "";
            string ErrorMsg    = "";
            // 禅道BUG12730,把支付宝改为支付宝支付
            string chargeMode = "支付宝支付";

            if (T.CorpID == 1973)
            {
                chargeMode = "自助缴费-支付宝";
            }

            long    iReceID    = 0;
            decimal PrecAmount = Convert.ToDecimal(T_Prec.DueAmount);

            ReceFeesPrec.ReceivePrecFees(AppGlobal.StrToInt(T_Order.CommID.ToString()), T_Order.CustId, T_Prec.RoomID, T_Prec.CostId.ToString(), chargeMode, PrecAmount, strUserCode, ref Result, ref ErrorMsg, ref iReceID, GetHandID(PubConstant.hmWyglConnectionString, out_trade_no));

            //更新账单信息
            T_Order.IsSucc = 1;
            conn.Update(T_Order);

            T_Prec.PaidAmount = T_Prec.DueAmount;
            conn.Update(T_Prec);
        }