public static bool GetRechargeOpen(int rechargeID) { RechargeOpen model = DAL.QQZoneRechargeDAL.GetRechargeOpen(rechargeID); if (model == null) { return(false); } else { return(model.IsOpen); } }
public static int SetRechargeOpen(RechargeOpen model) { using (var cn = new MySqlConnection(sqlconnectionString)) { cn.Open(); StringBuilder str = new StringBuilder(); //str.Append("SELECT DATE_FORMAT(curdate(), '%Y-%m-%d') as date, a.count as count, b.count as activeuser FROM (SELECT count(0) as count FROM Role where Gold > 10) as a, (SELECT count(0) as count FROM Role where Gold <= 10) as b;"); str.AppendFormat(@" update " + database1 + ".RechargeOpen set IsOpen=@IsOpen where RechargeID=@RechargeID "); int i = cn.Execute(str.ToString(), model); cn.Close(); return(i); } }
public static int SetRechargeOpen(RechargeOpen model) { return(DAL.QQZoneRechargeDAL.SetRechargeOpen(model)); }