Пример #1
0
        public void SaveHistory(Enums.HistoryType ct, Payment original, string uid)
        {
            History h = new History();

            h.ObjectTypeName = this.GetType().ToString();
            h.Identifier     = PaymentID;
            h.OrganizationID = PurchaseOrder.OrganizationID;
            h.ChangeType     = ct;

            switch (ct)
            {
            case org.secc.Purchasing.Enums.HistoryType.ADD:
                h.OriginalXML = null;
                h.UpdatedXML  = Serialize(this);
                break;

            case org.secc.Purchasing.Enums.HistoryType.UPDATE:
                h.OriginalXML = Serialize(original);
                h.UpdatedXML  = Serialize(this);
                break;

            case org.secc.Purchasing.Enums.HistoryType.DELETE:
                h.OriginalXML = Serialize(this);
                h.UpdatedXML  = null;
                break;
            }

            h.Active = true;
            h.Save(uid);
        }
Пример #2
0
        private void SaveHistory(Enums.HistoryType ht, CapitalRequestBid original, string userID)
        {
            History h = new History();

            h.ObjectTypeName = this.GetType().ToString();
            h.Identifier     = BidID;
            h.ChangeType     = ht;
            h.Active         = true;

            switch (ht)
            {
            case org.secc.Purchasing.Enums.HistoryType.ADD:
                h.OriginalXML = null;
                h.UpdatedXML  = base.Serialize(this);
                break;

            case org.secc.Purchasing.Enums.HistoryType.UPDATE:
                h.OriginalXML = base.Serialize(original);
                h.UpdatedXML  = base.Serialize(this);
                break;

            case org.secc.Purchasing.Enums.HistoryType.DELETE:
                h.OriginalXML = base.Serialize(this);
                h.UpdatedXML  = null;
                break;
            }

            h.Save(userID);
        }
Пример #3
0
        public void SaveHistory(Enums.HistoryType ht, Note original, string uid)
        {
            if (String.IsNullOrEmpty(uid))
            {
                throw new ArgumentNullException("uid", "User ID (uid) is required to save note history.");
            }

            History h = new History();

            h.ObjectTypeName = this.GetType().ToString();
            h.Identifier     = NoteID;
            h.ChangeType     = ht;
            h.OrganizationID = OrganizationID;

            switch (ht)
            {
            case org.secc.Purchasing.Enums.HistoryType.ADD:
                h.OriginalXML = null;
                h.UpdatedXML  = Serialize(this);
                break;

            case org.secc.Purchasing.Enums.HistoryType.UPDATE:
                h.OriginalXML = Serialize(original);
                h.UpdatedXML  = Serialize(this);
                break;

            case org.secc.Purchasing.Enums.HistoryType.DELETE:
                h.OriginalXML = Serialize(this);
                h.UpdatedXML  = null;
                break;
            }

            h.Active = true;

            h.Save(uid);
        }
Пример #4
0
 public HistoryStaging(int id, Enums.HistoryType ht, object original)
 {
     Identifier = id;
     ChangeType = ht;
     Original   = original;
 }