/// <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;
            }
        }
 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);
 }