/// <summary> /// Execute /// </summary> /// <returns></returns> protected override bool Execute() { Alert_ADO adoAlert = new Alert_ADO(); int updated = 0; if (DTO.LngIsoCode == Configuration_BSO.GetCustomConfig("language.iso.code")) { updated = adoAlert.Update(Ado, DTO, SamAccountName); } else { //Update or create in a language alternate version AlertLanguage_BSO bso = new AlertLanguage_BSO(); updated = bso.CreateOrUpdate(DTO, Ado); } if (updated == 0) { Log.Instance.Debug("Error updating Alert"); Response.error = Label.Get("error.update"); return(false); } Response.data = JSONRPC.success; return(true); }
/// <summary> /// Execute /// </summary> /// <returns></returns> protected override bool Execute() { Alert_ADO adoAlert = new Alert_ADO(); int deleted = adoAlert.Delete(Ado, DTO, SamAccountName); if (deleted == 0) { Log.Instance.Debug("Error deleting Alert"); Response.error = Label.Get("error.delete"); return(false); } Response.data = JSONRPC.success; return(true); }
/// <summary> /// Execute /// </summary> /// <returns></returns> protected override bool Execute() { Alert_ADO adoAlert = new Alert_ADO(); ADO_readerOutput result; result = adoAlert.Read(Ado, DTO, true); if (!result.hasData) { return(false); } Response.data = result.data; return(true); }