public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((IFloorViewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (Name_P != null)
            {
                ((Floor_cu)ActiveDBItem).Name_P = Name_P.ToString();
            }

            if (Name_S != null)
            {
                ((Floor_cu)ActiveDBItem).Name_S = Name_S.ToString();
            }

            if (InternalCode != null)
            {
                ((Floor_cu)ActiveDBItem).InternalCode = InternalCode.ToString();
            }

            if (Description != null)
            {
                ((Floor_cu)ActiveDBItem).Description = Description.ToString();
            }

            if (Location_CU_ID != null)
            {
                ((Floor_cu)ActiveDBItem).Location_CU_ID = Convert.ToInt32(Location_CU_ID);
            }

            if (UserID != null)
            {
                ((Floor_cu)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID);
            }

            ((Floor_cu)ActiveDBItem).IsOnDuty = true;
            switch (((IFloorViewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((Floor_cu)ActiveDBItem).IsOnDuty = false;
                break;
            }

            RelatedViewers = ((IFloorViewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
Ejemplo n.º 2
0
 protected override string[] GetContent()
 {
     return(new[]
     {
         ID.ToString(),
         Name,
         InternalCode.ToString("000"),
         IsoCode
     });
 }
Ejemplo n.º 3
0
        public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((IDoctorViewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (((Person_cu)ActiveDBItem).Doctor_cu == null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu = new Doctor_cu();
            }

            if (((Person_cu)ActiveDBItem).User_cu == null)
            {
                ((Person_cu)ActiveDBItem).User_cu = new User_cu();
            }

            #region General Person Details

            if (FirstName_P != null)
            {
                ((Person_cu)ActiveDBItem).FirstName_P = FirstName_P.ToString();
            }

            if (SecondName_P != null)
            {
                ((Person_cu)ActiveDBItem).SecondName_P = SecondName_P.ToString();
            }

            if (ThirdName_P != null)
            {
                ((Person_cu)ActiveDBItem).ThirdName_P = ThirdName_P.ToString();
            }

            if (FourthName_P != null)
            {
                ((Person_cu)ActiveDBItem).FourthName_P = FourthName_P.ToString();
            }

            if (Gender != null)
            {
                ((Person_cu)ActiveDBItem).Gender = Convert.ToBoolean(Gender);
            }

            if (MaritalStatusID != null)
            {
                ((Person_cu)ActiveDBItem).MaritalStatus_P_ID = Convert.ToInt32(MaritalStatusID);
            }

            if (BirthDate != null)
            {
                ((Person_cu)ActiveDBItem).BirthDate = Convert.ToDateTime(BirthDate);
            }

            if (Phone1 != null)
            {
                ((Person_cu)ActiveDBItem).Phone1 = Phone1.ToString();
            }

            if (Phone2 != null)
            {
                ((Person_cu)ActiveDBItem).Phone2 = Phone2.ToString();
            }

            if (Address != null)
            {
                ((Person_cu)ActiveDBItem).Address = Address.ToString();
            }

            if (EMail != null)
            {
                ((Person_cu)ActiveDBItem).EMail = EMail.ToString();
            }

            if (IdentificationCardTypeID != null)
            {
                ((Person_cu)ActiveDBItem).IdentificationCardType_P_ID = Convert.ToInt32(IdentificationCardTypeID);
            }

            if (IdentificationCardNumber != null)
            {
                ((Person_cu)ActiveDBItem).IdentificationCardNumber = IdentificationCardNumber.ToString();
            }

            if (IdentificationCardIssuingDate != null)
            {
                ((Person_cu)ActiveDBItem).IdentificationCardIssuingDate = Convert.ToDateTime(IdentificationCardIssuingDate);
            }

            if (IdentificationCardExpirationDate != null)
            {
                ((Person_cu)ActiveDBItem).IdentificationCardExpirationDate = Convert.ToDateTime(IdentificationCardExpirationDate);
            }

            if (Mobile1 != null)
            {
                ((Person_cu)ActiveDBItem).Mobile1 = Mobile1.ToString();
            }

            if (Mobile2 != null)
            {
                ((Person_cu)ActiveDBItem).Mobile2 = Mobile2.ToString();
            }

            ((Person_cu)ActiveDBItem).IsOnDuty = true;

            #endregion

            #region User Details

            if (InternalCode != null)
            {
                ((Person_cu)ActiveDBItem).User_cu.InternalCode = InternalCode.ToString();
            }

            if (LoginName != null)
            {
                ((Person_cu)ActiveDBItem).User_cu.LoginName = LoginName.ToString();
            }

            if (Password != null)
            {
                ((Person_cu)ActiveDBItem).User_cu.Password = Password.ToString();
            }

            ((Person_cu)ActiveDBItem).User_cu.OragnizationID = (int)ApplicationStaticConfiguration.Organization;

            ((Person_cu)ActiveDBItem).User_cu.IsOnDuty = true;

            #endregion

            #region Doctor Details

            if (InternalCode != null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu.InternalCode = InternalCode.ToString();
            }

            if (DoctorRankID != null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu.DoctorRank_P_ID = Convert.ToInt32(DoctorRankID);
            }

            if (DoctorSpecializationID != null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu.DoctorSpecialization_P_ID = Convert.ToInt32(DoctorSpecializationID);
            }

            if (DoctorCategoryID != null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu.DoctorCategory_CU_ID = Convert.ToInt32(DoctorCategoryID);
            }

            if (DoctorProfessionalFees != null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu.DoctorProfessionalFeesIssuingType_P_ID = Convert.ToInt32(DoctorProfessionalFees);
            }

            if (DoctorTaxTypeID != null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu.DoctorTaxType_CU_ID = Convert.ToInt32(DoctorTaxTypeID);
            }

            if (PrivateMobile != null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu.PrivateMobile = PrivateMobile.ToString();
            }

            if (Description != null)
            {
                ((Person_cu)ActiveDBItem).Doctor_cu.Description = Description.ToString();
            }

            ((Person_cu)ActiveDBItem).Doctor_cu.IsOnDuty = true;

            #endregion

            switch (((IDoctorViewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((Person_cu)ActiveDBItem).IsOnDuty           = false;
                ((Person_cu)ActiveDBItem).User_cu.IsOnDuty   = false;
                ((Person_cu)ActiveDBItem).Doctor_cu.IsOnDuty = false;
                break;
            }

            RelatedViewers = ((IDoctorViewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
Ejemplo n.º 4
0
        public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((ISupplierViewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (FirstName != null)
            {
                ((Person_cu)ActiveDBItem).FirstName_P = FirstName.ToString();
            }

            if (SecondName != null)
            {
                ((Person_cu)ActiveDBItem).SecondName_P = SecondName.ToString();
            }

            if (ThirdName != null)
            {
                ((Person_cu)ActiveDBItem).ThirdName_P = ThirdName.ToString();
            }

            if (FourthName != null)
            {
                ((Person_cu)ActiveDBItem).FourthName_P = FourthName.ToString();
            }

            if (MaritalStatus != null)
            {
                ((Person_cu)ActiveDBItem).MaritalStatus_P_ID = Convert.ToInt32(MaritalStatus);
            }

            if (Gender != null)
            {
                ((Person_cu)ActiveDBItem).Gender = Convert.ToBoolean(Gender);
            }

            if (BirthDate != null)
            {
                ((Person_cu)ActiveDBItem).BirthDate = Convert.ToDateTime(BirthDate);
            }

            if (Mobile1 != null)
            {
                ((Person_cu)ActiveDBItem).Mobile1 = Mobile1.ToString();
            }

            if (Mobile2 != null)
            {
                ((Person_cu)ActiveDBItem).Mobile2 = Mobile2.ToString();
            }

            if (Phone1 != null)
            {
                ((Person_cu)ActiveDBItem).Phone1 = Phone1.ToString();
            }

            if (Phone2 != null)
            {
                ((Person_cu)ActiveDBItem).Phone2 = Phone2.ToString();
            }

            if (Address != null)
            {
                ((Person_cu)ActiveDBItem).Address = Address.ToString();
            }

            if (Email != null)
            {
                ((Person_cu)ActiveDBItem).EMail = Email.ToString();
            }

            if (IdentificationCardType != null)
            {
                ((Person_cu)ActiveDBItem).IdentificationCardType_P_ID = Convert.ToInt32(IdentificationCardType);
            }

            if (IdentificationCardNumber != null)
            {
                ((Person_cu)ActiveDBItem).IdentificationCardNumber = IdentificationCardNumber.ToString();
            }

            if (IdentificationCardIssueDate != null)
            {
                ((Person_cu)ActiveDBItem).IdentificationCardIssuingDate = Convert.ToDateTime(IdentificationCardIssueDate);
            }

            if (IdentificationCardExpirationDate != null)
            {
                ((Person_cu)ActiveDBItem).IdentificationCardExpirationDate = Convert.ToDateTime(IdentificationCardExpirationDate);
            }

            if (((Person_cu)ActiveDBItem).Supplier_cu == null)
            {
                ((Person_cu)ActiveDBItem).Supplier_cu = new Supplier_cu();
            }

            if (InternalCode != null)
            {
                ((Person_cu)ActiveDBItem).Supplier_cu.InternalCode = InternalCode.ToString();
            }

            if (((Person_cu)ActiveDBItem).Supplier_cu != null)
            {
                ((Person_cu)ActiveDBItem).Supplier_cu.IsOnDuty = true;
            }

            ((Person_cu)ActiveDBItem).IsOnDuty = true;
            switch (((ISupplierViewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((Person_cu)ActiveDBItem).IsOnDuty = false;
                if (((Person_cu)ActiveDBItem).Supplier_cu != null)
                {
                    ((Person_cu)ActiveDBItem).Supplier_cu.IsOnDuty = false;
                }
                break;
            }

            RelatedViewers = ((ISupplierViewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
        public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((IServiceCategoryViewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (NameP != null)
            {
                ((ServiceCategory_cu)ActiveDBItem).Name_P = NameP.ToString();
            }

            if (NameS != null)
            {
                ((ServiceCategory_cu)ActiveDBItem).Name_S = NameS.ToString();
            }

            if (InternalCode != null)
            {
                ((ServiceCategory_cu)ActiveDBItem).InternalCode = InternalCode.ToString();
            }

            if (ServiceType != null)
            {
                ((ServiceCategory_cu)ActiveDBItem).ServiceType_P_ID = Convert.ToInt32(ServiceType);
            }

            ((ServiceCategory_cu)ActiveDBItem).IsMedical = Convert.ToBoolean(IsMedical);

            ((ServiceCategory_cu)ActiveDBItem).AllowAdmission = Convert.ToBoolean(AlloAdmission);

            if (Description != null)
            {
                ((ServiceCategory_cu)ActiveDBItem).Description = Description.ToString();
            }

            if (UserID != null)
            {
                ((ServiceCategory_cu)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID);
            }

            ((ServiceCategory_cu)ActiveDBItem).IsOnDuty = true;
            switch (((IServiceCategoryViewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((ServiceCategory_cu)ActiveDBItem).IsOnDuty = false;
                break;
            }

            RelatedViewers = ((IServiceCategoryViewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
        public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((IRawMaterial_Viewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (Name_P != null)
            {
                ((RawMaterials_cu)ActiveDBItem).Name_P = Name_P.ToString();
            }

            if (Name_S != null)
            {
                ((RawMaterials_cu)ActiveDBItem).Name_S = Name_S.ToString();
            }

            if (RawTypeID != null)
            {
                ((RawMaterials_cu)ActiveDBItem).RawTypeID = Convert.ToInt32(RawTypeID);
            }

            if (InternalCode != null)
            {
                ((RawMaterials_cu)ActiveDBItem).InternalCode = InternalCode.ToString();
            }

            if (Width != null)
            {
                ((RawMaterials_cu)ActiveDBItem).Width = Convert.ToDouble(Width);
            }

            if (Thickness != null)
            {
                ((RawMaterials_cu)ActiveDBItem).Thickness = Convert.ToDouble(Thickness);
            }

            if (Height != null)
            {
                ((RawMaterials_cu)ActiveDBItem).Height = Convert.ToDouble(Height);
            }

            if (Weight != null)
            {
                ((RawMaterials_cu)ActiveDBItem).Weight = Convert.ToDouble(Weight);
            }

            if (ExpirationDate != null)
            {
                ((RawMaterials_cu)ActiveDBItem).ExpirationDate = Convert.ToDateTime(ExpirationDate);
            }

            if (IsStockAvailable != null)
            {
                ((RawMaterials_cu)ActiveDBItem).IsStockAvailable = Convert.ToBoolean(IsStockAvailable);
            }

            if (IsCountable != null)
            {
                ((RawMaterials_cu)ActiveDBItem).IsCountable = Convert.ToBoolean(IsCountable);
            }

            if (ColorID != null)
            {
                ((RawMaterials_cu)ActiveDBItem).Color_CU_ID = Convert.ToInt32(ColorID);
            }

            if (DividedTypeID != null)
            {
                ((RawMaterials_cu)ActiveDBItem).DividedByType_P_ID = Convert.ToInt32(DividedTypeID);
            }

            if (Description != null)
            {
                ((RawMaterials_cu)ActiveDBItem).Description = Description.ToString();
            }

            if (UserID != null)
            {
                ((RawMaterials_cu)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID);
            }

            ((RawMaterials_cu)ActiveDBItem).IsOnDuty = true;

            switch (((IRawMaterial_Viewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((RawMaterials_cu)ActiveDBItem).IsOnDuty = false;
                break;
            }

            RelatedViewers = ((IRawMaterial_Viewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
Ejemplo n.º 7
0
        public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((IInventoryItem_Area_Viewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (InventoryItemID != null)
            {
                ((InventoryItem_Area)ActiveDBItem).InventoryItemID = Convert.ToInt32(InventoryItemID);
            }

            if (Width != null)
            {
                ((InventoryItem_Area)ActiveDBItem).Width = Convert.ToDouble(Width);
            }

            if (Height != null)
            {
                ((InventoryItem_Area)ActiveDBItem).Height = Convert.ToDouble(Height);
            }

            if (Count != null)
            {
                ((InventoryItem_Area)ActiveDBItem).Count = Convert.ToInt32(Count);
            }

            if (InternalCode != null)
            {
                ((InventoryItem_Area)ActiveDBItem).InternalCode = InternalCode.ToString();
            }

            if (SizeUnitMeasure_P_ID != null)
            {
                ((InventoryItem_Area)ActiveDBItem).SizeUnitMeasure_P_ID = Convert.ToInt32(SizeUnitMeasure_P_ID);
            }

            if (UserID != null)
            {
                ((InventoryItem_Area)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID);
            }

            ((InventoryItem_Area)ActiveDBItem).IsOnDuty = true;

            switch (((IInventoryItem_Area_Viewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((InventoryItem_Area)ActiveDBItem).IsOnDuty = false;
                break;
            }

            RelatedViewers = ((IInventoryItem_Area_Viewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
Ejemplo n.º 8
0
        public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((ILocationViewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (Name_P != null)
            {
                ((Location_cu)ActiveDBItem).Name_P = Name_P.ToString();
            }

            if (Name_S != null)
            {
                ((Location_cu)ActiveDBItem).Name_S = Name_S.ToString();
            }

            if (InternalCode != null)
            {
                ((Location_cu)ActiveDBItem).InternalCode = InternalCode.ToString();
            }

            if (Description != null)
            {
                ((Location_cu)ActiveDBItem).Description = Description.ToString();
            }

            if (Address != null)
            {
                ((Location_cu)ActiveDBItem).Address = Address.ToString();
            }

            if (Country_CU_ID != null)
            {
                ((Location_cu)ActiveDBItem).Country_CU_ID = Convert.ToInt32(Country_CU_ID);
            }

            if (City_CU_ID != null)
            {
                ((Location_cu)ActiveDBItem).City_CU_ID = Convert.ToInt32(City_CU_ID);
            }

            if (Region_CU_ID != null)
            {
                ((Location_cu)ActiveDBItem).Region_CU_ID = Convert.ToInt32(Region_CU_ID);
            }

            if (Territory_CU_ID != null)
            {
                ((Location_cu)ActiveDBItem).Territory_CU_ID = Convert.ToInt32(Territory_CU_ID);
            }

            ((Location_cu)ActiveDBItem).Organization_P_ID = Convert.ToInt32(ApplicationStaticConfiguration.Organization);

            if (UserID != null)
            {
                ((Location_cu)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID);
            }

            ((Location_cu)ActiveDBItem).IsOnDuty = true;
            switch (((ILocationViewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((Location_cu)ActiveDBItem).IsOnDuty = false;
                break;
            }

            RelatedViewers = ((ILocationViewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
        public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((IServiceViewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (Name_P != null)
            {
                ((Service_cu)ActiveDBItem).Name_P = Name_P.ToString();
            }

            if (Name_S != null)
            {
                ((Service_cu)ActiveDBItem).Name_S = Name_S.ToString();
            }

            if (ServiceCategory_CU_ID != null)
            {
                ((Service_cu)ActiveDBItem).ServiceCategory_CU_ID = Convert.ToInt32(ServiceCategory_CU_ID);
            }

            if (ServiceType_P_ID != null)
            {
                ((Service_cu)ActiveDBItem).ServiceType_P_ID = Convert.ToInt32(ServiceType_P_ID);
            }

            if (ParentService_CU_ID != null)
            {
                ((Service_cu)ActiveDBItem).ParentService_CU_ID = Convert.ToInt32(ParentService_CU_ID);
            }

            if (InternalCode != null)
            {
                ((Service_cu)ActiveDBItem).InternalCode = InternalCode.ToString();
            }

            if (DefaultPriceFrom != null)
            {
                ((Service_cu)ActiveDBItem).DefaultPrice = Convert.ToDouble(DefaultPriceFrom);
            }

            ((Service_cu)ActiveDBItem).EnforceCategorization = Convert.ToBoolean(EnforceCategorization);
            ((Service_cu)ActiveDBItem).IsDailyCharged        = Convert.ToBoolean(IsDailyCharged);
            ((Service_cu)ActiveDBItem).AllowAddmission       = Convert.ToBoolean(AllowAddmission);

            if (Description != null)
            {
                ((Service_cu)ActiveDBItem).Description = Description.ToString();
            }

            if (UserID != null)
            {
                ((Service_cu)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID);
            }

            ((Service_cu)ActiveDBItem).IsOnDuty = true;
            switch (((IServiceViewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((Service_cu)ActiveDBItem).IsOnDuty = false;
                break;
            }

            RelatedViewers = ((IServiceViewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
        public override bool Collect(AbstractDataCollector <TEntity> collector)
        {
            if (collector == null)
            {
                return(false);
            }

            ActiveCollector = collector;

            ID = ((IInventoryItemViewer)ActiveCollector.ActiveViewer).ID;

            if (ActiveDBItem == null)
            {
                return(false);
            }

            if (Name_P != null)
            {
                ((InventoryItem_cu)ActiveDBItem).Name_P = Name_P.ToString();
            }

            if (Name_S != null)
            {
                ((InventoryItem_cu)ActiveDBItem).Name_S = Name_S.ToString();
            }

            if (InventoryHousing_CU_ID != null)
            {
                ((InventoryItem_cu)ActiveDBItem).InventoryHousing_CU_ID = Convert.ToInt32(InventoryHousing_CU_ID);
            }

            if (InventoryItemCategory_CU_ID != null)
            {
                ((InventoryItem_cu)ActiveDBItem).InventoryItemCategory_CU_ID = Convert.ToInt32(InventoryItemCategory_CU_ID);
            }

            if (InventoryItemBrand_CU_ID != null)
            {
                ((InventoryItem_cu)ActiveDBItem).InventoryItemBrand_CU_ID = Convert.ToInt32(InventoryItemBrand_CU_ID);
            }

            if (DefaultUnitMeasurment_CU_ID != null)
            {
                ((InventoryItem_cu)ActiveDBItem).InventoryTrackingUnitMeasurment_CU_ID = Convert.ToInt32(DefaultUnitMeasurment_CU_ID);
            }

            if (InventoryItemType_P_ID != null)
            {
                ((InventoryItem_cu)ActiveDBItem).InventoryItemType_P_ID = Convert.ToInt32(InventoryItemType_P_ID);
            }

            if (InternalCode != null)
            {
                ((InventoryItem_cu)ActiveDBItem).InternalCode = InternalCode.ToString();
            }

            if (DefaultBarcode != null)
            {
                ((InventoryItem_cu)ActiveDBItem).DefaultBarcode = DefaultBarcode.ToString();
            }

            if (DefaultSellingPrice != null)
            {
                ((InventoryItem_cu)ActiveDBItem).DefaultSellingPrice = Convert.ToDouble(DefaultSellingPrice);
            }

            if (DefaultCost != null)
            {
                ((InventoryItem_cu)ActiveDBItem).DefaultCost = Convert.ToDouble(DefaultCost);
            }

            if (RorderedPoint != null)
            {
                ((InventoryItem_cu)ActiveDBItem).RorderedPoint = Convert.ToDouble(RorderedPoint);
            }

            if (StockMinLevel != null)
            {
                ((InventoryItem_cu)ActiveDBItem).StockMinLevel = Convert.ToDouble(StockMinLevel);
            }

            if (AcceptOverrideMinAmount != null)
            {
                ((InventoryItem_cu)ActiveDBItem).AcceptOverrideMinAmount = Convert.ToBoolean(AcceptOverrideMinAmount);
            }

            if (CanBeSold != null)
            {
                ((InventoryItem_cu)ActiveDBItem).CanBeSold = Convert.ToBoolean(CanBeSold);
            }

            if (IsAvailable != null)
            {
                ((InventoryItem_cu)ActiveDBItem).IsAvailable = Convert.ToBoolean(IsAvailable);
            }

            if (AcceptPartingSelling != null)
            {
                ((InventoryItem_cu)ActiveDBItem).AcceptPartingSelling = Convert.ToBoolean(AcceptPartingSelling);
            }

            if (IsCountable != null)
            {
                ((InventoryItem_cu)ActiveDBItem).IsCountable = Convert.ToBoolean(IsCountable);
            }

            if (SellingStartDate != null)
            {
                ((InventoryItem_cu)ActiveDBItem).SellingStartDate = Convert.ToDateTime(SellingStartDate);
            }

            if (SellingEndDate != null)
            {
                ((InventoryItem_cu)ActiveDBItem).SellingEndDate = Convert.ToDateTime(SellingEndDate);
            }

            if (ExpirationDate != null)
            {
                ((InventoryItem_cu)ActiveDBItem).ExpirationDate = Convert.ToDateTime(ExpirationDate);
            }

            if (Description != null)
            {
                ((InventoryItem_cu)ActiveDBItem).Description = Description.ToString();
            }

            if (Width != null)
            {
                ((InventoryItem_cu)ActiveDBItem).Width = Convert.ToDouble(Width);
            }

            if (Height != null)
            {
                ((InventoryItem_cu)ActiveDBItem).Height = Convert.ToDouble(Height);
            }

            if (Depth != null)
            {
                ((InventoryItem_cu)ActiveDBItem).Depth = Convert.ToDouble(Depth);
            }

            ((InventoryItem_cu)ActiveDBItem).IsOnDuty = true;
            switch (((IInventoryItemViewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            {
            case DB_CommonTransactionType.DeleteExisting:
                ((InventoryItem_cu)ActiveDBItem).IsOnDuty = false;
                break;
            }

            RelatedViewers = ((IInventoryItemViewer)ActiveCollector.ActiveViewer).RelatedViewers;

            return(true);
        }
 public override string ToString()
 {
     return(internCode.ToString());
 }