Beispiel #1
0
        protected void SaveApproveHistory(string dealId, string type, string comment, bool saveChange = false)
        {
            var rec = new ApprovalHistory
            {
                DealId = dealId,
                Type = type,
                DateTime = DateTime.Now,
                Comment = comment,
                UserId = GetCurrentMemberShipUser().COATUser.Id
            };

            db.ApprovalHistories.AddObject(rec);
            if (saveChange)
            {
                db.SaveChanges();
            }
        }
Beispiel #2
0
 /// <summary>
 /// Create a new ApprovalHistory object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="type">Initial value of the Type property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="comment">Initial value of the Comment property.</param>
 /// <param name="dateTime">Initial value of the DateTime property.</param>
 public static ApprovalHistory CreateApprovalHistory(global::System.Int32 id, global::System.String type, global::System.Int32 userId, global::System.String comment, global::System.DateTime dateTime)
 {
     ApprovalHistory approvalHistory = new ApprovalHistory();
     approvalHistory.Id = id;
     approvalHistory.Type = type;
     approvalHistory.UserId = userId;
     approvalHistory.Comment = comment;
     approvalHistory.DateTime = dateTime;
     return approvalHistory;
 }
Beispiel #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ApprovalHistories EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToApprovalHistories(ApprovalHistory approvalHistory)
 {
     base.AddObject("ApprovalHistories", approvalHistory);
 }