/// <summary> /// Create a new PersonHistory object. /// </summary> /// <param name="idPersonHistory">Initial value of the idPersonHistory property.</param> /// <param name="idPerson">Initial value of the idPerson property.</param> /// <param name="idCreateUser">Initial value of the idCreateUser property.</param> /// <param name="creationDate">Initial value of the CreationDate property.</param> /// <param name="idModifyUser">Initial value of the idModifyUser property.</param> /// <param name="modifyDate">Initial value of the ModifyDate property.</param> public static PersonHistory CreatePersonHistory(global::System.Int32 idPersonHistory, global::System.Int32 idPerson, global::System.Int32 idCreateUser, global::System.DateTime creationDate, global::System.Int32 idModifyUser, global::System.DateTime modifyDate) { PersonHistory personHistory = new PersonHistory(); personHistory.idPersonHistory = idPersonHistory; personHistory.idPerson = idPerson; personHistory.idCreateUser = idCreateUser; personHistory.CreationDate = creationDate; personHistory.idModifyUser = idModifyUser; personHistory.ModifyDate = modifyDate; return personHistory; }
protected void btnМакеHistory_Click(object sender, EventArgs e) { if (!this.ownerPage.CheckUserActionPermission(ETEMEnums.SecuritySettings.PersonSave, false)) { return; } PersonHistory newPersonHistory = new PersonHistory(); this.currentEntity = this.ownerPage.AdminClientRef.GetPersonByPersonID(this.MasterKeyID); newPersonHistory.idPerson = currentEntity.idPerson; newPersonHistory.FirstName = currentEntity.FirstName; newPersonHistory.SecondName = currentEntity.SecondName; newPersonHistory.LastName = currentEntity.LastName; newPersonHistory.IdentityNumber = currentEntity.IDCard; newPersonHistory.IdentityNumberDate = currentEntity.IdentityNumberDate; newPersonHistory.IdentityNumberIssueBy = currentEntity.IdentityNumberIssueBy; newPersonHistory.idCreateUser = Int32.Parse(this.ownerPage.UserProps.IdUser); newPersonHistory.idModifyUser = Int32.Parse(this.ownerPage.UserProps.IdUser); newPersonHistory.CreationDate = DateTime.Now; newPersonHistory.ModifyDate = DateTime.Now; this.ownerPage.CallContext.CurrentConsumerID = this.ownerPage.UserProps.IdUser; this.ownerPage.AdminClientRef.PersonHistorySave(newPersonHistory, this.ownerPage.CallContext); LoadPersonHistory(); }
/// <summary> /// Deprecated Method for adding a new object to the PersonHistories EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPersonHistories(PersonHistory personHistory) { base.AddObject("PersonHistories", personHistory); }