public int SystemRequestRecord_Add(int userID, int bussnessId, decimal requestMoney, int requestType, out string errorMsg) { SqlCommand cmd = db.GetStoredProcedureCommand("Proc_SystemRequestRecord_Add"); db.AddInputParameter(cmd, "@UserID", DbType.Int32, userID); db.AddInputParameter(cmd, "@BussnessId", DbType.Int32, bussnessId); db.AddInputParameter(cmd, "@RequestMoney", DbType.Decimal, requestMoney); db.AddInputParameter(cmd, "@RequestType", DbType.Int32, requestType); db.AddOutputParameter(cmd, "@ErrorMsg", DbType.String, 500); db.AddReturnValueParameter(cmd, "@ReturnValue", DbType.Int32, 4); db.ExecuteNonQuery(cmd); errorMsg = db.GetParameter(cmd, "@ErrorMsg").Value.ToString(); return(db.GetParameter(cmd, "@ReturnValue").Value.ToInt()); }
/// <summary> /// 2.7. 转账 (用于投资) /// </summary> /// <param name="uid"></param> /// <param name="PayNo"></param> /// <returns></returns> public bool ToCpTransaction(string PayNo, out string errorMsg) { SqlCommand cmd = db.GetStoredProcedureCommand("Proc_Transaction_PayCompleted"); db.AddInputParameter(cmd, "@PayNo", System.Data.DbType.String, PayNo); db.AddOutputParameter(cmd, "@ErrorMsg", System.Data.DbType.String, 4); db.AddReturnValueParameter(cmd, "@ReturnValue", System.Data.DbType.Int32, 4); db.ExecuteNonQuery(cmd); errorMsg = db.GetParameter(cmd, "@ErrorMsg").Value.ToString(); return(db.GetParameter(cmd, "@ReturnValue").Value.ToInt() == 1); }
/// <summary> /// 用户注册 /// </summary> /// <param name="model"></param> /// <returns></returns> public int SystemUsers_Registered(SystemUsers model, out string errorMsg) { SqlCommand cmd = db.GetStoredProcedureCommand("Proc_SystemUsers_Registered"); db.AddInputParameter(cmd, "@UserName", DbType.String, model.UserName); db.AddInputParameter(cmd, "@UserPassword", DbType.String, model.UserPassword); db.AddInputParameter(cmd, "@UserEmail", DbType.String, model.UserEmail); db.AddInputParameter(cmd, "@CellPhone", DbType.String, model.CellPhone); db.AddInputParameter(cmd, "@CellPahoneIsAuthenticate", DbType.Boolean, model.CellPahoneIsAuthenticate); db.AddInputParameter(cmd, "@UserState", DbType.Int32, model.UserState); db.AddInputParameter(cmd, "@UserType", DbType.Int32, model.UserType); db.AddInputParameter(cmd, "@Recommended", DbType.String, model.Recommended); db.AddInputParameter(cmd, "@IsEnterprise", DbType.Int32, model.IsEnterprise); db.AddInputParameter(cmd, "@RegTime", DbType.String, model.RegTime); db.AddOutputParameter(cmd, "@ErrorMsg", DbType.String, 500); db.AddReturnValueParameter(cmd, "@ReturnValue", DbType.Int32, 4); db.ExecuteNonQuery(cmd); errorMsg = db.GetParameter(cmd, "@ErrorMsg").Value.ToString(); return(db.GetParameter(cmd, "@ReturnValue").Value.ToInt()); }
/// <summary> /// 添加债券明细 /// </summary> /// <param name="userID">用户编号</param> /// <param name="claimsID">债券ID</param> /// <param name="buyCount">购买数量</param> /// <param name="dayEarnings">日结利息</param> /// <param name="expireEarnings">预期收益</param> /// <param name="IsUserBounty">是否使用虚拟本金</param> /// <param name="virtualMoney">虚拟本金数量</param> /// <param name="virtualMoneyDayEarnings">虚拟本金日结利息</param> /// <param name="errorMsg">错误信息</param> /// <param name="targetUserID">扣钱的用户ID</param> /// <returns></returns> public int SystemClaimsDetails_Add(int userID, int claimsID, int buyCount, decimal dayEarnings, decimal expireEarnings, int IsUserBounty, decimal virtualMoney, decimal virtualMoneyDayEarnings, out string errorMsg, out int targetUserID) { errorMsg = ""; SqlCommand cmd = db.GetStoredProcedureCommand("Proc_SystemClaimsDetails_Add"); db.AddInputParameter(cmd, "@UserID", DbType.Int32, userID); db.AddInputParameter(cmd, "@ClaimsID", DbType.Int32, claimsID); db.AddInputParameter(cmd, "@BuyCount", DbType.Int32, buyCount); db.AddInputParameter(cmd, "@DayEarnings", DbType.Decimal, dayEarnings); db.AddInputParameter(cmd, "@ExpireEarnings", DbType.Decimal, expireEarnings); db.AddInputParameter(cmd, "@IsUserBounty", DbType.Int32, IsUserBounty); db.AddInputParameter(cmd, "@VirtualMoney", DbType.Decimal, virtualMoney); db.AddInputParameter(cmd, "@VirtualMoneyDayEarnings", DbType.Decimal, virtualMoneyDayEarnings); db.AddOutputParameter(cmd, "@TargetUserID", DbType.Int32, 40); db.AddOutputParameter(cmd, "@ErrorMsg", DbType.String, 500); db.AddReturnValueParameter(cmd, "@ReturnValue", DbType.Int32, 40); db.ExecuteNonQuery(cmd); errorMsg = db.GetParameter(cmd, "@ErrorMsg").Value.ToString(); targetUserID = db.GetParameter(cmd, "@TargetUserID").Value.ToInt(); return(db.GetParameter(cmd, "@ReturnValue").Value.ToInt()); }