예제 #1
0
 public bool Save(AlarmInfo info)
 {
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("INSERT INTO vshop_AlarmNotify (AppId, ErrorType, Description, AlarmContent, TimeStamp) VALUES (@AppId, @ErrorType, @Description, @AlarmContent, @TimeStamp)");
     this.database.AddInParameter(sqlStringCommand, "AppId", DbType.String, info.AppId);
     this.database.AddInParameter(sqlStringCommand, "ErrorType", DbType.Int32, info.ErrorType);
     this.database.AddInParameter(sqlStringCommand, "Description", DbType.String, info.Description);
     this.database.AddInParameter(sqlStringCommand, "AlarmContent", DbType.String, info.AlarmContent);
     this.database.AddInParameter(sqlStringCommand, "TimeStamp", DbType.DateTime, info.TimeStamp);
     return (this.database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Response.Write("success");
     SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
     AlarmNotify alarmNotify = new NotifyClient(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, masterSettings.WeixinPaySignKey).GetAlarmNotify(base.Request.InputStream);
     if (alarmNotify != null)
     {
         AlarmInfo info = new AlarmInfo {
             AlarmContent = alarmNotify.AlarmContent,
             AppId = alarmNotify.AppId,
             Description = alarmNotify.Description
         };
         VShopHelper.SaveAlarm(info);
     }
 }
예제 #3
0
 public static bool SaveAlarm(AlarmInfo info)
 {
     return new AlarmDao().Save(info);
 }