Esempio n. 1
0
        /// <summary>
        /// Save And Update Ownership Status
        /// </summary>
        /// <param name="ownershipDetail"></param>
        /// <returns></returns>
        public int SaveAndUpdateOwnershipStatus(OwnershipStatusDTO ownershipDetail)
        {
            ownershipstatu ownershipStatusEntity = new ownershipstatu();
            AutoMapper.Mapper.Map(ownershipDetail, ownershipStatusEntity);

            if (ownershipDetail.OwnershipStatus_Id == 0)
            {
                base.OwnershipStatusRepository.Save(ownershipStatusEntity);
            }
            else
            {
                base.OwnershipStatusRepository.Update(ownershipStatusEntity);
            }
            return ownershipStatusEntity.OwnershipStatus_Id;
        }
Esempio n. 2
0
     private void Fixupownershipstatu(ownershipstatu previousValue)
     {
         if (previousValue != null && previousValue.customers.Contains(this))
         {
             previousValue.customers.Remove(this);
         }
 
         if (ownershipstatu != null)
         {
             if (!ownershipstatu.customers.Contains(this))
             {
                 ownershipstatu.customers.Add(this);
             }
             if (Cust_OwnershipStatus != ownershipstatu.OwnershipStatus_Id)
             {
                 Cust_OwnershipStatus = ownershipstatu.OwnershipStatus_Id;
             }
         }
     }