Пример #1
0
        /// <summary>
        /// Task 256: Adding records in e service authorization after adding new organization node in organizations structure
        ///
        /// </summary>
        /// <returns></returns>
        public virtual Result Add()
        {
            try
            {
                Result result = new Result();
                EServicesAuthorizations EServiceAuthorization = new EServicesAuthorizations()
                {
                    OrganizationID         = this.Organization.OrganizationID,
                    EServiceTypeID         = this.EServiceType.EServiceTypeID,
                    AuthorizedPersonCodeID = this.AuthorizedPerson.EmployeeCodeID,
                    CreatedDate            = DateTime.Now,
                    CreatedBy = this.LoginIdentity.EmployeeCodeID
                };

                this.EServiceAuthorizationID = new EServicesAuthorizationsDAL().Insert(EServiceAuthorization);

                result.Entity     = this;
                result.EnumType   = typeof(EServicesAuthorizationsEnum);
                result.EnumMember = EServicesAuthorizationsEnum.Done.ToString();
                return(result);
            }
            catch
            {
                throw;
            }
        }
Пример #2
0
 internal EServicesAuthorizationsBLL MapEServiceAuthorization(EServicesAuthorizations item)
 {
     return(item != null ?
            new EServicesAuthorizationsBLL()
     {
         EServiceAuthorizationID = item.EServiceAuthorizationID,
         AuthorizedPerson = new EmployeesCodesBLL().MapEmployeeCode(item.AuthorizedPersonNav),
         Organization = new OrganizationsStructuresBLL().MapOrganizationWithoutManager(item.OrganizationsStructures),
         EServiceType = new EServicesTypesBLL().MapEServicesTypes(item.EServicesTypes)
     }
         : null);
 }