Ejemplo n.º 1
0
        public void AddCooordinator(int idRequest, Coordinator coordinator, string sendDescription)
        {
            var agreement = new RequestAgreement
            {
                IdRequest        = idRequest,
                IdAgreementType  = 2,
                IdAgreementState = 1,
                SendDate         = DateTime.Now,
                SendDescription  = sendDescription,
                User             = new AclUser
                {
                    Login      = coordinator.Login,
                    Snp        = coordinator.Snp,
                    Email      = coordinator.Email,
                    Phone      = coordinator.Phone,
                    Department = new Department
                    {
                        IdParentDepartment = null,
                        Name = coordinator.Department
                    },
                    Roles = new List <Domain.Entities.AclRole>
                    {
                        new Domain.Entities.AclRole
                        {
                            IdRole = 8
                        }
                    }
                }
            };
            var requestState = new RequestState
            {
                IdRequest          = idRequest,
                IdRequestStateType = 1,
                Date = DateTime.Now
            };

            RequestsRepository.AddRequestState(requestState, false);
            RequestsRepository.AddAdditionalAgreement(agreement);
        }