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

            ActiveCollector = collector;

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

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

            if (List_InventoryItem_UnitMeasurment == null || List_InventoryItem_UnitMeasurment.Count == 0)
            {
                return(false);
            }

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

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

            ActiveCollector = collector;

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

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

            if (List_CashBoxTransactionType_GeneralChartOfAccountType == null ||
                List_CashBoxTransactionType_GeneralChartOfAccountType.Count == 0)
            {
                return(false);
            }

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

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

            ActiveCollector = collector;

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

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

            if (List_User_UserGroup == null || List_User_UserGroup.Count == 0)
            {
                return(false);
            }

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

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

            ActiveCollector = collector;

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

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

            if (List_DiagnosisCategory_Diagnosis == null || List_DiagnosisCategory_Diagnosis.Count == 0)
            {
                return(false);
            }

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

            return(true);
        }
        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 = ((IRawMaterialTransaction_Viewer)ActiveCollector.ActiveViewer).ID;

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

            //if (RawMaterialID != null)
            //	((RawMaterialTranasction) ActiveDBItem).RawMaterial_CU_ID = Convert.ToInt32(RawMaterialID);

            //if (RawTransactionTypeID != null)
            //	((RawMaterialTranasction)ActiveDBItem).RawMaterialTransactionType_P_ID = Convert.ToInt32(RawTransactionTypeID);

            //if (Count != null)
            //	((RawMaterialTranasction)ActiveDBItem).Count = Convert.ToInt32(Count);

            //if (PuchasingPrice != null)
            //	((RawMaterialTranasction)ActiveDBItem).PuchasingPrice = Convert.ToDouble(PuchasingPrice);

            //if (Width != null)
            //	((RawMaterialTranasction)ActiveDBItem).Width = Convert.ToDouble(Width);

            //if (Height != null)
            //	((RawMaterialTranasction)ActiveDBItem).Height = Convert.ToDouble(Height);

            //if (TransactionDate != null)
            //	((RawMaterialTranasction)ActiveDBItem).Date = Convert.ToDateTime(TransactionDate);

            //if (DividedTypeID != null)
            //	((RawMaterialTranasction)ActiveDBItem).DividedByType_P_ID = Convert.ToInt32(DividedTypeID);

            //if (ColorID != null)
            //	((RawMaterialTranasction)ActiveDBItem).Color_CU_ID = Convert.ToInt32(ColorID);

            //if (UserID != null)
            //	((RawMaterialTranasction)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID);

            //((RawMaterialTranasction)ActiveDBItem).IsOnDuty = true;

            //switch (((IRawMaterialTransaction_Viewer)ActiveCollector.ActiveViewer).CommonTransactionType)
            //{
            //	case DB_CommonTransactionType.DeleteExisting:
            //		((RawMaterialTranasction)ActiveDBItem).IsOnDuty = false;
            //		break;
            //}

            RelatedViewers = ((IRawMaterialTransaction_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 = ((IOrganizationMachine_Viewer)ActiveCollector.ActiveViewer).ID;

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

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

            //if (StationPoint_CU_ID != null)
            //	((OrganizationMachine_cu)ActiveDBItem).StationPoint_CU_ID = Convert.ToInt32(StationPoint_CU_ID);

            //if (StationPointStage_CU_ID != null)
            //	((OrganizationMachine_cu)ActiveDBItem).StationPointStage_CU_ID = Convert.ToInt32(StationPointStage_CU_ID);

            ((OrganizationMachine_cu)ActiveDBItem).OrganizationID = Convert.ToInt32(ApplicationStaticConfiguration.Organization);

            if (SkinName != null)
            {
                ((OrganizationMachine_cu)ActiveDBItem).SkinName = SkinName.ToString();
            }

            if (Color != null)
            {
                ((OrganizationMachine_cu)ActiveDBItem).Color = Color.ToString();
            }

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

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

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

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

            ActiveCollector = collector;

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

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

            if (DailyTransactionType != null)
            {
                ((FinanceDailyTransaction)ActiveDBItem).DailyTransactionType_P_ID =
                    Convert.ToInt32(DailyTransactionType);
            }

            if (Amount != null)
            {
                ((FinanceDailyTransaction)ActiveDBItem).Amount = Convert.ToDouble(Amount);
            }

            if (Date != null)
            {
                ((FinanceDailyTransaction)ActiveDBItem).Date = Convert.ToDateTime(Date);
            }

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

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

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

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

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

            ActiveCollector = collector;

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

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

            ActiveCollector = collector;

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

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

            ActiveCollector = collector;

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

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

            ActiveCollector = collector;

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

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

            ActiveCollector = collector;

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

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

            ActiveCollector = collector;

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

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

            ActiveCollector = collector;

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

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

            //((CashBoxInOutTransaction) ActiveDBItem).DBCommonTransactionType = CommonTransactionType;


            //if (CashBoxTransactionType_P_ID != null)
            //	((CashBoxInOutTransaction)ActiveDBItem).CashBoxTransactionType_P_ID =
            //		Convert.ToInt32(CashBoxTransactionType_P_ID);

            //if (TransactionAmount != null)
            //	((CashBoxInOutTransaction) ActiveDBItem).TransactionAmount = Convert.ToDouble(TransactionAmount);

            //if (TranscationSerial != null)
            //	((CashBoxInOutTransaction) ActiveDBItem).TranscationSerial = TranscationSerial.ToString();

            //if (Description != null)
            //	((CashBoxInOutTransaction)ActiveDBItem).Description = Description.ToString();

            //((CashBoxInOutTransaction) ActiveDBItem).PaymentType_P_ID = (int) DB_PaymentType.CashPayment;
            //((CashBoxInOutTransaction) ActiveDBItem).IsCancelled = false;

            //if (UserID != null)
            //	((CashBoxInOutTransaction)ActiveDBItem).InsertedBy = Convert.ToInt32(UserID);

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

            //RelatedViewers = ((ICashBoxInOutTransactionViewer)ActiveCollector.ActiveViewer).RelatedViewers;

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

            ActiveCollector = collector;

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

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

            ((InsuranceCarrier_InsuranceLevel_cu)ActiveDBItem).DBCommonTransactionType =
                ((IInsurancePolicyViewer)ActiveCollector.ActiveViewer).CommonTransactionType;
            if (((IInsurancePolicyViewer)ActiveCollector.ActiveViewer).InsuranceCarrierID != null)
            {
                ((InsuranceCarrier_InsuranceLevel_cu)ActiveDBItem).InsuranceCarrier_CU_ID =
                    Convert.ToInt32(((IInsurancePolicyViewer)ActiveCollector.ActiveViewer).InsuranceCarrierID);
            }
            if (((IInsurancePolicyViewer)ActiveCollector.ActiveViewer).InsuranceLevelID != null)
            {
                ((InsuranceCarrier_InsuranceLevel_cu)ActiveDBItem).InsuranceLevel_CU_ID =
                    Convert.ToInt32(((IInsurancePolicyViewer)ActiveCollector.ActiveViewer).InsuranceLevelID);
            }
            if (((IInsurancePolicyViewer)ActiveCollector.ActiveViewer).PatientMaxAmount != null)
            {
                ((InsuranceCarrier_InsuranceLevel_cu)ActiveDBItem).PatientMaxAmount =
                    Convert.ToInt32(((IInsurancePolicyViewer)ActiveCollector.ActiveViewer).PatientMaxAmount);
            }

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

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

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

            ActiveCollector = collector;

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

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

            if (ChildUnitMeasurment_CU_ID != null)
            {
                ((UnitMeasurmentTreeLink_cu)ActiveDBItem).ChildUnitMeasurment_CU_ID = Convert.ToInt32(ChildUnitMeasurment_CU_ID);
            }

            if (ParentUnitMeasurment_CU_ID != null)
            {
                ((UnitMeasurmentTreeLink_cu)ActiveDBItem).ParentUnitMeasurment_CU_ID = Convert.ToInt32(ParentUnitMeasurment_CU_ID);
            }

            if (EncapsulatedChildQantity != null)
            {
                ((UnitMeasurmentTreeLink_cu)ActiveDBItem).EncapsulatedChildQantity = Convert.ToDouble(EncapsulatedChildQantity);
            }

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

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

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

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

            ActiveCollector = collector;

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

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

            if (ChartOfAccount_CU_ID != null)
            {
                ((PersonType_ChartOfAccount_cu)ActiveDBItem).ChartOfAccount_CU_ID = Convert.ToInt32(ChartOfAccount_CU_ID);
            }

            if (PersonType_P_ID != null)
            {
                ((PersonType_ChartOfAccount_cu)ActiveDBItem).PersonType_P_ID = Convert.ToInt32(PersonType_P_ID);
            }

            if (PersonChartOfAccountType_P_ID != null)
            {
                ((PersonType_ChartOfAccount_cu)ActiveDBItem).PersonChartOfAccountType_P_ID = Convert.ToInt32(PersonChartOfAccountType_P_ID);
            }

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

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

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

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

            ActiveCollector = collector;

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

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

            if (List_RoleRegistration == null || List_RoleRegistration.Count == 0)
            {
                return(false);
            }

            foreach (RoleRegistration_cu roleRegistration in List_RoleRegistration)
            {
                ((RoleRegistration_cu)ActiveDBItem).User_CU_ID      = roleRegistration.User_CU_ID;
                ((RoleRegistration_cu)ActiveDBItem).UserGroup_CU_ID = roleRegistration.UserGroup_CU_ID;
                ((RoleRegistration_cu)ActiveDBItem).Role_P_ID       = roleRegistration.Role_P_ID;
            }

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

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

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

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

            ActiveCollector = collector;

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

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

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

            ActiveCollector = collector;

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

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

            if (List_InventoryItemGroup_InventoryItem == null || List_InventoryItemGroup_InventoryItem.Count == 0)
            {
                return(false);
            }

            foreach (InventoryItemGroup_InventoryItem_cu bridge in List_InventoryItemGroup_InventoryItem)
            {
                ((InventoryItemGroup_InventoryItem_cu)ActiveDBItem).InvetoryItemGroup_CU_ID = bridge.InvetoryItemGroup_CU_ID;
                ((InventoryItemGroup_InventoryItem_cu)ActiveDBItem).InventoryItem_CU_ID     = bridge.InventoryItem_CU_ID;
            }

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

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

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

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

            ActiveCollector = collector;

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

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

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

            if (StationPoint_CU_ID != null)
            {
                ((ServiceCategory_StationPoint_cu)ActiveDBItem).StationPoint_CU_ID = Convert.ToInt32(StationPoint_CU_ID);
            }

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

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

            RelatedViewers = ((IServiceCategory_StationPointViewer)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);
        }
Example #25
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);
        }
Example #26
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);
        }
        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 = ((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);
        }
Example #29
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);
        }
Example #30
0
 public abstract bool Collect(AbstractDataCollector <TEntity> collector);