コード例 #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;
        }
コード例 #2
0
ファイル: customer.cs プロジェクト: nitinkhannas/TCESS.ESales
     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;
             }
         }
     }