public override bool Collect(AbstractDataCollector <TEntity> collector) { if (collector == null) { return(false); } ActiveCollector = collector; ID = ((IDiagnosisCategory_Viewer)ActiveCollector.ActiveViewer).ID; if (ActiveDBItem == null) { return(false); } if (Name_P != null) { ((DiagnosisCategory_cu)ActiveDBItem).Name_P = Name_P.ToString(); } if (Name_S != null) { ((DiagnosisCategory_cu)ActiveDBItem).Name_S = Name_S.ToString(); } if (Abbreviation != null) { ((DiagnosisCategory_cu)ActiveDBItem).Abbreviation = Abbreviation.ToString(); } if (IsDoctorRelated != null && Convert.ToBoolean(IsDoctorRelated)) { if (DoctorID == null) { MessageToView = "You should choose the Doctor"; return(false); } ((DiagnosisCategory_cu)ActiveDBItem).IsDoctorRelated = true; } if (UserID != null) { ((DiagnosisCategory_cu)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID); } ((DiagnosisCategory_cu)ActiveDBItem).IsOnDuty = true; switch (((IDiagnosisCategory_Viewer)ActiveCollector.ActiveViewer).CommonTransactionType) { case DB_CommonTransactionType.DeleteExisting: ((DiagnosisCategory_cu)ActiveDBItem).IsOnDuty = false; break; } RelatedViewers = ((IDiagnosisCategory_Viewer)ActiveCollector.ActiveViewer).RelatedViewers; return(true); }
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); }
public override bool Collect(AbstractDataCollector <TEntity> collector) { if (collector == null) { return(false); } ActiveCollector = collector; ID = ((IMedicationCategoryViewer)ActiveCollector.ActiveViewer).ID; if (ActiveDBItem == null) { return(false); } if (Name_P != null) { ((MedicationCategory_cu)ActiveDBItem).Name_P = Name_P.ToString(); } if (Name_S != null) { ((MedicationCategory_cu)ActiveDBItem).Name_S = Name_S.ToString(); } if (UserID != null) { ((MedicationCategory_cu)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID); } ((MedicationCategory_cu)ActiveDBItem).IsOnDuty = true; switch (((IMedicationCategoryViewer)ActiveCollector.ActiveViewer).CommonTransactionType) { case DB_CommonTransactionType.DeleteExisting: ((MedicationCategory_cu)ActiveDBItem).IsOnDuty = false; break; } RelatedViewers = ((IMedicationCategoryViewer)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); }
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 = ((IChartOfAccountViewer)ActiveCollector.ActiveViewer).ID; if (ActiveDBItem == null) { return(false); } if (Name_P != null) { ((ChartOfAccount_cu)ActiveDBItem).Name_P = Name_P.ToString(); } if (Name_S != null) { ((ChartOfAccount_cu)ActiveDBItem).Name_S = Name_S.ToString(); } if (Description != null) { ((ChartOfAccount_cu)ActiveDBItem).Description = Description.ToString(); } DB_ChartOfAccountCodeMargin chartOfAccountCodeMargin = DB_ChartOfAccountCodeMargin.None; if (ChartOfAccountCodeMargin_P_ID != null) { ((ChartOfAccount_cu)ActiveDBItem).ChartOfAccountCodeMargin_P_ID = Convert.ToInt32(ChartOfAccountCodeMargin_P_ID); chartOfAccountCodeMargin = (DB_ChartOfAccountCodeMargin)Convert.ToInt32(ChartOfAccountCodeMargin_P_ID); } if (ParentChartOfAccount_CU_ID != null) { ((ChartOfAccount_cu)ActiveDBItem).ParentChartOfAccount_CU_ID = Convert.ToInt32(ParentChartOfAccount_CU_ID); } if (Serial != null) { switch (chartOfAccountCodeMargin) { case DB_ChartOfAccountCodeMargin.FirstMargin: ((ChartOfAccount_cu)ActiveDBItem).Serial = Convert.ToInt64(Serial); break; case DB_ChartOfAccountCodeMargin.SecondMargin: case DB_ChartOfAccountCodeMargin.ThirdMargin: case DB_ChartOfAccountCodeMargin.FourthMargin: case DB_ChartOfAccountCodeMargin.FifthMargin: ((ChartOfAccount_cu)ActiveDBItem).Serial = AccountingBusinessLogicEngine.GetChartOfAccountSerial(ParentChartOfAccount_CU_ID, Serial); break; } } if (IsDebit != null) { ((ChartOfAccount_cu)ActiveDBItem).IsDebit = Convert.ToBoolean(IsDebit); } if (UserID != null) { ((ChartOfAccount_cu)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID); } ((ChartOfAccount_cu)ActiveDBItem).IsOnDuty = true; switch (((IChartOfAccountViewer)ActiveCollector.ActiveViewer).CommonTransactionType) { case DB_CommonTransactionType.DeleteExisting: ((ChartOfAccount_cu)ActiveDBItem).IsOnDuty = false; break; } RelatedViewers = ((IChartOfAccountViewer)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); }