印仔 发布的文章

static void CreateAlertUsingCode(Args _args)
{
EventInbox inbox;
;
inbox.initValue();
inbox.ShowPopup = NoYes::Yes;
inbox.Subject = "This is the Alert subject";
inbox.Message = "This is the Alert message";
inbox.AlertedFor = "This alert is just information no links are available";
inbox.SendEmail = false;
inbox.UserId = curuserid();
inbox.TypeId = classnum(EventType);
inbox.AlertTableId = tablenum(Address);
inbox.AlertFieldId = fieldnum(Address, Name);
inbox.TypeTrigger = EventTypeTrigger::FieldChanged;
inbox.CompanyId = curext();
inbox.InboxId = EventInbox::nextEventId();;
inbox.AlertCreatedDateTime = DateTimeUtil::getSystemDateTime();
inbox.insert();
}

https://www.theaxapta.com/2012/11/create-alert-using-x-codes.html

public static string toXML(Object obj)
{
    string ret;

    XmlSerializer serializer = new XmlSerializer(obj.GetType());
    using (StringWriter writer = new StringWriter())
    {
        serializer.Serialize(writer, obj);
        ret = writer.ToString();
    }
    return ret;
}

修改 C:\AOSService\webroot 以下文件节点(如域不变仅更改1),然后重启IIS,不要编译/同步数据库,
记得备份原配置文件!!!!.

  1. web.config

    • DataAccess.Database
    • DataAccess.DbServer
    • DataAccess.SqlUser
    • DataAccess.SqlPwd
  2. wif.config

    • audienceUris.add ,值修改为 spn:环境ID;
  3. wif.serveices.config

    wsFederation节点属性