Ejemplo n.º 1
0
            private static bool Exists(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    DbCommand command = managedConnection.manage(query.CreateExistsQuery(TableName));
                    query.SetParameters(command);

                    var reader = command.ExecuteReader();
                    reader.Read();
                    int resultCount = reader.GetInt32(0);
                    reader.Close();
                    managedConnection.commit();
                    return(resultCount == 1);
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
            }
            private static List <ORM_HEC_ACT_PerformedAction_DiagnosisUpdate> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection        managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_HEC_ACT_PerformedAction_DiagnosisUpdate> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_HEC_ACT_PerformedAction_DiagnosisUpdate>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "HEC_ACT_PerformedAction_DiagnosisUpdateID", "HealthcarePerformedAction_DiagnosisITL", "HEC_ACT_PerformedAction_RefID", "HEC_Patient_Diagnosis_RefID", "PotentialDiagnosis_RefID", "DiagnosisState_RefID", "IsDiagnosisAssumed", "IsDiagnosisConfirmed", "IsDiagnosisNegated", "IsDiagnosisCreated", "IsDiagnosisModified", "IsDiagnosisDeactivated", "ScheduledExpiryDate", "Deactivated_OnDate", "DeactivatedBy_Doctor_RefID", "DiagnosisUpdateComment", "IM_PotentialDiagnosis_Name", "IM_PotentialDiagnosis_Code", "IM_PotentialDiagnosisCatalog_Name", "IM_PotentialDiagnosisState_Name", "IM_DeactivatingDoctor_FullName", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_HEC_ACT_PerformedAction_DiagnosisUpdate item = new ORM_HEC_ACT_PerformedAction_DiagnosisUpdate();
                        //0:Parameter HEC_ACT_PerformedAction_DiagnosisUpdateID of type Guid
                        item.HEC_ACT_PerformedAction_DiagnosisUpdateID = reader.GetGuid(0);
                        //1:Parameter HealthcarePerformedAction_DiagnosisITL of type String
                        item.HealthcarePerformedAction_DiagnosisITL = reader.GetString(1);
                        //2:Parameter HEC_ACT_PerformedAction_RefID of type Guid
                        item.HEC_ACT_PerformedAction_RefID = reader.GetGuid(2);
                        //3:Parameter HEC_Patient_Diagnosis_RefID of type Guid
                        item.HEC_Patient_Diagnosis_RefID = reader.GetGuid(3);
                        //4:Parameter PotentialDiagnosis_RefID of type Guid
                        item.PotentialDiagnosis_RefID = reader.GetGuid(4);
                        //5:Parameter DiagnosisState_RefID of type Guid
                        item.DiagnosisState_RefID = reader.GetGuid(5);
                        //6:Parameter IsDiagnosisAssumed of type Boolean
                        item.IsDiagnosisAssumed = reader.GetBoolean(6);
                        //7:Parameter IsDiagnosisConfirmed of type Boolean
                        item.IsDiagnosisConfirmed = reader.GetBoolean(7);
                        //8:Parameter IsDiagnosisNegated of type Boolean
                        item.IsDiagnosisNegated = reader.GetBoolean(8);
                        //9:Parameter IsDiagnosisCreated of type Boolean
                        item.IsDiagnosisCreated = reader.GetBoolean(9);
                        //10:Parameter IsDiagnosisModified of type Boolean
                        item.IsDiagnosisModified = reader.GetBoolean(10);
                        //11:Parameter IsDiagnosisDeactivated of type Boolean
                        item.IsDiagnosisDeactivated = reader.GetBoolean(11);
                        //12:Parameter ScheduledExpiryDate of type DateTime
                        item.ScheduledExpiryDate = reader.GetDate(12);
                        //13:Parameter Deactivated_OnDate of type DateTime
                        item.Deactivated_OnDate = reader.GetDate(13);
                        //14:Parameter DeactivatedBy_Doctor_RefID of type Guid
                        item.DeactivatedBy_Doctor_RefID = reader.GetGuid(14);
                        //15:Parameter DiagnosisUpdateComment of type String
                        item.DiagnosisUpdateComment = reader.GetString(15);
                        //16:Parameter IM_PotentialDiagnosis_Name of type String
                        item.IM_PotentialDiagnosis_Name = reader.GetString(16);
                        //17:Parameter IM_PotentialDiagnosis_Code of type String
                        item.IM_PotentialDiagnosis_Code = reader.GetString(17);
                        //18:Parameter IM_PotentialDiagnosisCatalog_Name of type String
                        item.IM_PotentialDiagnosisCatalog_Name = reader.GetString(18);
                        //19:Parameter IM_PotentialDiagnosisState_Name of type String
                        item.IM_PotentialDiagnosisState_Name = reader.GetString(19);
                        //20:Parameter IM_DeactivatingDoctor_FullName of type String
                        item.IM_DeactivatingDoctor_FullName = reader.GetString(20);
                        //21:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(21);
                        //22:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(22);
                        //23:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(23);
                        //24:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(24);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 3
0
            private static List <ORM_HEC_DIA_STA_Medication_UsageStatistic> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection      managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_HEC_DIA_STA_Medication_UsageStatistic> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_HEC_DIA_STA_Medication_UsageStatistic>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "HEC_DIA_STA_Medication_UsageStatisticsID", "IsHealthcareProduct", "IfHealthcareProduct_HealthcareProduct_RefID", "IsSubstance", "IfSubstance_Substance_RefID", "IfSubstance_Strength", "DosageText", "PotentialDiagnosis_RefID", "NumberOfOccurences", "IsStatistics_ForDoctor", "IfStatistics_ForDoctor_Doctor_RefID", "IsStatistics_ForHCG", "IfStatistics_ForHCG_HealthcareCommunityGroup_RefID", "StatisticsPeriod_From", "StatisticsPeriod_Through", "IsLatestStatisticsData", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_HEC_DIA_STA_Medication_UsageStatistic item = new ORM_HEC_DIA_STA_Medication_UsageStatistic();
                        //0:Parameter HEC_DIA_STA_Medication_UsageStatisticsID of type Guid
                        item.HEC_DIA_STA_Medication_UsageStatisticsID = reader.GetGuid(0);
                        //1:Parameter IsHealthcareProduct of type Boolean
                        item.IsHealthcareProduct = reader.GetBoolean(1);
                        //2:Parameter IfHealthcareProduct_HealthcareProduct_RefID of type Guid
                        item.IfHealthcareProduct_HealthcareProduct_RefID = reader.GetGuid(2);
                        //3:Parameter IsSubstance of type Boolean
                        item.IsSubstance = reader.GetBoolean(3);
                        //4:Parameter IfSubstance_Substance_RefID of type Guid
                        item.IfSubstance_Substance_RefID = reader.GetGuid(4);
                        //5:Parameter IfSubstance_Strength of type String
                        item.IfSubstance_Strength = reader.GetString(5);
                        //6:Parameter DosageText of type String
                        item.DosageText = reader.GetString(6);
                        //7:Parameter PotentialDiagnosis_RefID of type Guid
                        item.PotentialDiagnosis_RefID = reader.GetGuid(7);
                        //8:Parameter NumberOfOccurences of type int
                        item.NumberOfOccurences = reader.GetInteger(8);
                        //9:Parameter IsStatistics_ForDoctor of type Boolean
                        item.IsStatistics_ForDoctor = reader.GetBoolean(9);
                        //10:Parameter IfStatistics_ForDoctor_Doctor_RefID of type Guid
                        item.IfStatistics_ForDoctor_Doctor_RefID = reader.GetGuid(10);
                        //11:Parameter IsStatistics_ForHCG of type Boolean
                        item.IsStatistics_ForHCG = reader.GetBoolean(11);
                        //12:Parameter IfStatistics_ForHCG_HealthcareCommunityGroup_RefID of type Guid
                        item.IfStatistics_ForHCG_HealthcareCommunityGroup_RefID = reader.GetGuid(12);
                        //13:Parameter StatisticsPeriod_From of type DateTime
                        item.StatisticsPeriod_From = reader.GetDate(13);
                        //14:Parameter StatisticsPeriod_Through of type DateTime
                        item.StatisticsPeriod_Through = reader.GetDate(14);
                        //15:Parameter IsLatestStatisticsData of type Boolean
                        item.IsLatestStatisticsData = reader.GetBoolean(15);
                        //16:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(16);
                        //17:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(17);
                        //18:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(18);
                        //19:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(19);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 4
0
            private static List <ORM_CMN_PRO_Product_Release> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_PRO_Product_Release>          items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_PRO_Product_Release>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_PRO_Product_ReleaseID", "ProductReleaseITL", "Product_RefID", "Product_Variant_RefID", "IsRelease_Released", "IsRelease_UnderDevelopment", "IfReleased_ReleasedDate", "IfUnderDevelopment_EstimatedReleaseDate", "ProductRelease_DocumentationStructure_RefID", "Product_ReleaseName", "OrderSequence", "Creation_Timestamp", "IsDeleted", "Tenant_RefID", "IsStandardProductRelease" });
                    while (reader.Read())
                    {
                        ORM_CMN_PRO_Product_Release item = new ORM_CMN_PRO_Product_Release();
                        //0:Parameter CMN_PRO_Product_ReleaseID of type Guid
                        item.CMN_PRO_Product_ReleaseID = reader.GetGuid(0);
                        //1:Parameter ProductReleaseITL of type String
                        item.ProductReleaseITL = reader.GetString(1);
                        //2:Parameter Product_RefID of type Guid
                        item.Product_RefID = reader.GetGuid(2);
                        //3:Parameter Product_Variant_RefID of type Guid
                        item.Product_Variant_RefID = reader.GetGuid(3);
                        //4:Parameter IsRelease_Released of type Boolean
                        item.IsRelease_Released = reader.GetBoolean(4);
                        //5:Parameter IsRelease_UnderDevelopment of type Boolean
                        item.IsRelease_UnderDevelopment = reader.GetBoolean(5);
                        //6:Parameter IfReleased_ReleasedDate of type DateTime
                        item.IfReleased_ReleasedDate = reader.GetDate(6);
                        //7:Parameter IfUnderDevelopment_EstimatedReleaseDate of type DateTime
                        item.IfUnderDevelopment_EstimatedReleaseDate = reader.GetDate(7);
                        //8:Parameter ProductRelease_DocumentationStructure_RefID of type Guid
                        item.ProductRelease_DocumentationStructure_RefID = reader.GetGuid(8);
                        //9:Parameter Product_ReleaseName of type String
                        item.Product_ReleaseName = reader.GetString(9);
                        //10:Parameter OrderSequence of type int
                        item.OrderSequence = reader.GetInteger(10);
                        //11:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(11);
                        //12:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(12);
                        //13:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(13);
                        //14:Parameter IsStandardProductRelease of type Boolean
                        item.IsStandardProductRelease = reader.GetBoolean(14);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 5
0
            private static List <ORM_CMN_BPT_EMP_ExtraWorkCalculation> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_BPT_EMP_ExtraWorkCalculation> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_BPT_EMP_ExtraWorkCalculation>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_BPT_EMP_ExtraWorkCalculationID", "GlobalPropertyMatchingID", "ExtraWorkCalculation_Name_DictID", "IsCalculatingOvertimeEnabled", "AreAdditionalWorkDays_CalculatedIn_Hours", "AreAdditionalWorkDays_CalculatedIn_DaysAsHours", "AreAdditionalWorkDays_CalculatedIn_Days", "StandardWorkDay_in_mins", "IsDisplayedAs_HoursAsDays", "IsDisplayedAs_DaysAndHours", "MinimalOvertimeTreshold_in_minutes", "Creation_Timestamp", "IsDeleted", "Tenant_RefID" });
                    while (reader.Read())
                    {
                        ORM_CMN_BPT_EMP_ExtraWorkCalculation item = new ORM_CMN_BPT_EMP_ExtraWorkCalculation();
                        //0:Parameter CMN_BPT_EMP_ExtraWorkCalculationID of type Guid
                        item.CMN_BPT_EMP_ExtraWorkCalculationID = reader.GetGuid(0);
                        //1:Parameter GlobalPropertyMatchingID of type String
                        item.GlobalPropertyMatchingID = reader.GetString(1);
                        //2:Parameter ExtraWorkCalculation_Name of type Dict
                        item.ExtraWorkCalculation_Name = reader.GetDictionary(2);
                        loader.Append(item.ExtraWorkCalculation_Name, TableName);
                        //3:Parameter IsCalculatingOvertimeEnabled of type Boolean
                        item.IsCalculatingOvertimeEnabled = reader.GetBoolean(3);
                        //4:Parameter AreAdditionalWorkDays_CalculatedIn_Hours of type Boolean
                        item.AreAdditionalWorkDays_CalculatedIn_Hours = reader.GetBoolean(4);
                        //5:Parameter AreAdditionalWorkDays_CalculatedIn_DaysAsHours of type Boolean
                        item.AreAdditionalWorkDays_CalculatedIn_DaysAsHours = reader.GetBoolean(5);
                        //6:Parameter AreAdditionalWorkDays_CalculatedIn_Days of type Boolean
                        item.AreAdditionalWorkDays_CalculatedIn_Days = reader.GetBoolean(6);
                        //7:Parameter StandardWorkDay_in_mins of type int
                        item.StandardWorkDay_in_mins = reader.GetInteger(7);
                        //8:Parameter IsDisplayedAs_HoursAsDays of type Boolean
                        item.IsDisplayedAs_HoursAsDays = reader.GetBoolean(8);
                        //9:Parameter IsDisplayedAs_DaysAndHours of type Boolean
                        item.IsDisplayedAs_DaysAndHours = reader.GetBoolean(9);
                        //10:Parameter MinimalOvertimeTreshold_in_minutes of type int
                        item.MinimalOvertimeTreshold_in_minutes = reader.GetInteger(10);
                        //11:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(11);
                        //12:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(12);
                        //13:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(13);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw ex;
                }
                return(items);
            }
Ejemplo n.º 6
0
            private static List <ORM_CMN_QST_QuestionItem_StandardAnswerType> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection        managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_QST_QuestionItem_StandardAnswerType> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_QST_QuestionItem_StandardAnswerType>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_QST_QuestionItem_StandardAnswerTypeID", "IsBoolean", "IsNumber", "IfNumber_IsInteger", "IfNumber_Min_Inclusive", "IfNumber_Max_Exclusive", "IsShortText", "IfShortText_MaxLength", "IsLongText", "Creation_Timestamp", "IsDeleted", "Tenant_RefID" });
                    while (reader.Read())
                    {
                        ORM_CMN_QST_QuestionItem_StandardAnswerType item = new ORM_CMN_QST_QuestionItem_StandardAnswerType();
                        //0:Parameter CMN_QST_QuestionItem_StandardAnswerTypeID of type Guid
                        item.CMN_QST_QuestionItem_StandardAnswerTypeID = reader.GetGuid(0);
                        //1:Parameter IsBoolean of type Boolean
                        item.IsBoolean = reader.GetBoolean(1);
                        //2:Parameter IsNumber of type Boolean
                        item.IsNumber = reader.GetBoolean(2);
                        //3:Parameter IfNumber_IsInteger of type Boolean
                        item.IfNumber_IsInteger = reader.GetBoolean(3);
                        //4:Parameter IfNumber_Min_Inclusive of type int
                        item.IfNumber_Min_Inclusive = reader.GetInteger(4);
                        //5:Parameter IfNumber_Max_Exclusive of type int
                        item.IfNumber_Max_Exclusive = reader.GetInteger(5);
                        //6:Parameter IsShortText of type Boolean
                        item.IsShortText = reader.GetBoolean(6);
                        //7:Parameter IfShortText_MaxLength of type int
                        item.IfShortText_MaxLength = reader.GetInteger(7);
                        //8:Parameter IsLongText of type Boolean
                        item.IsLongText = reader.GetBoolean(8);
                        //9:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(9);
                        //10:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(10);
                        //11:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(11);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw ex;
                }
                return(items);
            }
Ejemplo n.º 7
0
            private static List <ORM_USR_Device_ConfigurationCode_StatusHistory> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection           managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_USR_Device_ConfigurationCode_StatusHistory> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_USR_Device_ConfigurationCode_StatusHistory>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "USR_Device_ConfigurationCode_StatusHistoryID", "Device_ConfigurationCode_RefID", "WasUsed", "WasUsedBy_UserDevice_RefID", "WasDeactivated", "WasDeactivatedBy_BusinessParticipant_RefID", "WasDeleted", "WasDeletedBy_BusinessParticipant_RefID", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_USR_Device_ConfigurationCode_StatusHistory item = new ORM_USR_Device_ConfigurationCode_StatusHistory();
                        //0:Parameter USR_Device_ConfigurationCode_StatusHistoryID of type Guid
                        item.USR_Device_ConfigurationCode_StatusHistoryID = reader.GetGuid(0);
                        //1:Parameter Device_ConfigurationCode_RefID of type Guid
                        item.Device_ConfigurationCode_RefID = reader.GetGuid(1);
                        //2:Parameter WasUsed of type Boolean
                        item.WasUsed = reader.GetBoolean(2);
                        //3:Parameter WasUsedBy_UserDevice_RefID of type Guid
                        item.WasUsedBy_UserDevice_RefID = reader.GetGuid(3);
                        //4:Parameter WasDeactivated of type Boolean
                        item.WasDeactivated = reader.GetBoolean(4);
                        //5:Parameter WasDeactivatedBy_BusinessParticipant_RefID of type Guid
                        item.WasDeactivatedBy_BusinessParticipant_RefID = reader.GetGuid(5);
                        //6:Parameter WasDeleted of type Boolean
                        item.WasDeleted = reader.GetBoolean(6);
                        //7:Parameter WasDeletedBy_BusinessParticipant_RefID of type Guid
                        item.WasDeletedBy_BusinessParticipant_RefID = reader.GetGuid(7);
                        //8:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(8);
                        //9:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(9);
                        //10:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(10);
                        //11:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(11);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 8
0
            private static List <ORM_HEC_Patient_Prescription_Header> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_HEC_Patient_Prescription_Header>  items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_HEC_Patient_Prescription_Header>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "HEC_Patient_Prescription_HeaderID", "HEC_ACT_PerformedAction_RefID", "Patient_RefID", "PrescribedBy_Doctor_RefID", "Prescription_InternalNumber", "Prescription_Date", "Prescription_Comment", "Perscription_UploadedByBusinessParticipant_RefID", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_HEC_Patient_Prescription_Header item = new ORM_HEC_Patient_Prescription_Header();
                        //0:Parameter HEC_Patient_Prescription_HeaderID of type Guid
                        item.HEC_Patient_Prescription_HeaderID = reader.GetGuid(0);
                        //1:Parameter HEC_ACT_PerformedAction_RefID of type Guid
                        item.HEC_ACT_PerformedAction_RefID = reader.GetGuid(1);
                        //2:Parameter Patient_RefID of type Guid
                        item.Patient_RefID = reader.GetGuid(2);
                        //3:Parameter PrescribedBy_Doctor_RefID of type Guid
                        item.PrescribedBy_Doctor_RefID = reader.GetGuid(3);
                        //4:Parameter Prescription_InternalNumber of type String
                        item.Prescription_InternalNumber = reader.GetString(4);
                        //5:Parameter Prescription_Date of type DateTime
                        item.Prescription_Date = reader.GetDate(5);
                        //6:Parameter Prescription_Comment of type String
                        item.Prescription_Comment = reader.GetString(6);
                        //7:Parameter Perscription_UploadedByBusinessParticipant_RefID of type Guid
                        item.Perscription_UploadedByBusinessParticipant_RefID = reader.GetGuid(7);
                        //8:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(8);
                        //9:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(9);
                        //10:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(10);
                        //11:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(11);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
            private static List <ORM_CMN_CTR_Contract_DefaultParameter> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection  managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_CTR_Contract_DefaultParameter> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_CTR_Contract_DefaultParameter>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_CTR_Contract_DefaultParameterID", "GlobalPropertyMatchingID", "Contract_RefID", "ParameterName", "IsStringValue", "IfStringValue_DefaultValue", "IsNumericValue", "IfNumericValue_DefaultValue", "IsBooleanValue", "IfBooleanValue_DefaultValue", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_CMN_CTR_Contract_DefaultParameter item = new ORM_CMN_CTR_Contract_DefaultParameter();
                        //0:Parameter CMN_CTR_Contract_DefaultParameterID of type Guid
                        item.CMN_CTR_Contract_DefaultParameterID = reader.GetGuid(0);
                        //1:Parameter GlobalPropertyMatchingID of type String
                        item.GlobalPropertyMatchingID = reader.GetString(1);
                        //2:Parameter Contract_RefID of type Guid
                        item.Contract_RefID = reader.GetGuid(2);
                        //3:Parameter ParameterName of type String
                        item.ParameterName = reader.GetString(3);
                        //4:Parameter IsStringValue of type Boolean
                        item.IsStringValue = reader.GetBoolean(4);
                        //5:Parameter IfStringValue_DefaultValue of type String
                        item.IfStringValue_DefaultValue = reader.GetString(5);
                        //6:Parameter IsNumericValue of type Boolean
                        item.IsNumericValue = reader.GetBoolean(6);
                        //7:Parameter IfNumericValue_DefaultValue of type double
                        item.IfNumericValue_DefaultValue = reader.GetDouble(7);
                        //8:Parameter IsBooleanValue of type Boolean
                        item.IsBooleanValue = reader.GetBoolean(8);
                        //9:Parameter IfBooleanValue_DefaultValue of type Boolean
                        item.IfBooleanValue_DefaultValue = reader.GetBoolean(9);
                        //10:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(10);
                        //11:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(11);
                        //12:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(12);
                        //13:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(13);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 10
0
            private static List <ORM_TMS_PRO_DeveloperTask> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_TMS_PRO_DeveloperTask>            items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_TMS_PRO_DeveloperTask>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "TMS_PRO_DeveloperTaskID", "IdentificationNumber", "DOC_Structure_Header_RefID", "CreatedBy_ProjectMember_RefID", "Priority_RefID", "Project_RefID", "DeveloperTask_Type_RefID", "IsTaskEstimable", "DeveloperTime_RequiredEstimation_min", "DeveloperTime_CurrentInvestment_min", "GrabbedByMember_RefID", "Completion_Deadline", "Completion_Timestamp", "PercentageComplete", "Name", "Description", "Developer_Points", "IsComplete", "IsIncompleteInformation", "IsArchived", "IsBeingPrepared", "Creation_Timestamp", "IsDeleted", "Tenant_RefID" });
                    while (reader.Read())
                    {
                        ORM_TMS_PRO_DeveloperTask item = new ORM_TMS_PRO_DeveloperTask();
                        //0:Parameter TMS_PRO_DeveloperTaskID of type Guid
                        item.TMS_PRO_DeveloperTaskID = reader.GetGuid(0);
                        //1:Parameter IdentificationNumber of type String
                        item.IdentificationNumber = reader.GetString(1);
                        //2:Parameter DOC_Structure_Header_RefID of type Guid
                        item.DOC_Structure_Header_RefID = reader.GetGuid(2);
                        //3:Parameter CreatedBy_ProjectMember_RefID of type Guid
                        item.CreatedBy_ProjectMember_RefID = reader.GetGuid(3);
                        //4:Parameter Priority_RefID of type Guid
                        item.Priority_RefID = reader.GetGuid(4);
                        //5:Parameter Project_RefID of type Guid
                        item.Project_RefID = reader.GetGuid(5);
                        //6:Parameter DeveloperTask_Type_RefID of type Guid
                        item.DeveloperTask_Type_RefID = reader.GetGuid(6);
                        //7:Parameter IsTaskEstimable of type Boolean
                        item.IsTaskEstimable = reader.GetBoolean(7);
                        //8:Parameter DeveloperTime_RequiredEstimation_min of type Double
                        item.DeveloperTime_RequiredEstimation_min = reader.GetDouble(8);
                        //9:Parameter DeveloperTime_CurrentInvestment_min of type Double
                        item.DeveloperTime_CurrentInvestment_min = reader.GetDouble(9);
                        //10:Parameter GrabbedByMember_RefID of type Guid
                        item.GrabbedByMember_RefID = reader.GetGuid(10);
                        //11:Parameter Completion_Deadline of type DateTime
                        item.Completion_Deadline = reader.GetDate(11);
                        //12:Parameter Completion_Timestamp of type DateTime
                        item.Completion_Timestamp = reader.GetDate(12);
                        //13:Parameter PercentageComplete of type String
                        item.PercentageComplete = reader.GetString(13);
                        //14:Parameter Name of type String
                        item.Name = reader.GetString(14);
                        //15:Parameter Description of type String
                        item.Description = reader.GetString(15);
                        //16:Parameter Developer_Points of type int
                        item.Developer_Points = reader.GetInteger(16);
                        //17:Parameter IsComplete of type Boolean
                        item.IsComplete = reader.GetBoolean(17);
                        //18:Parameter IsIncompleteInformation of type Boolean
                        item.IsIncompleteInformation = reader.GetBoolean(18);
                        //19:Parameter IsArchived of type Boolean
                        item.IsArchived = reader.GetBoolean(19);
                        //20:Parameter IsBeingPrepared of type Boolean
                        item.IsBeingPrepared = reader.GetBoolean(20);
                        //21:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(21);
                        //22:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(22);
                        //23:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(23);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 11
0
            private static List <ORM_RES_ACT_Action_Version> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_RES_ACT_Action_Version>           items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_RES_ACT_Action_Version>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "RES_ACT_Action_VersionID", "Action_RefID", "Action_Name_DictID", "Action_Description_DictID", "Action_Version", "Default_PricePerUnit_RefID", "Default_Unit_RefID", "Default_UnitAmount", "Creation_Timestamp", "IsDeleted", "Tenant_RefID" });
                    while (reader.Read())
                    {
                        ORM_RES_ACT_Action_Version item = new ORM_RES_ACT_Action_Version();
                        //0:Parameter RES_ACT_Action_VersionID of type Guid
                        item.RES_ACT_Action_VersionID = reader.GetGuid(0);
                        //1:Parameter Action_RefID of type Guid
                        item.Action_RefID = reader.GetGuid(1);
                        //2:Parameter Action_Name of type Dict
                        item.Action_Name = reader.GetDictionary(2);
                        loader.Append(item.Action_Name, TableName);
                        //3:Parameter Action_Description of type Dict
                        item.Action_Description = reader.GetDictionary(3);
                        loader.Append(item.Action_Description, TableName);
                        //4:Parameter Action_Version of type int
                        item.Action_Version = reader.GetInteger(4);
                        //5:Parameter Default_PricePerUnit_RefID of type Guid
                        item.Default_PricePerUnit_RefID = reader.GetGuid(5);
                        //6:Parameter Default_Unit_RefID of type Guid
                        item.Default_Unit_RefID = reader.GetGuid(6);
                        //7:Parameter Default_UnitAmount of type double
                        item.Default_UnitAmount = reader.GetDouble(7);
                        //8:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(8);
                        //9:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(9);
                        //10:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(10);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
            private static List <ORM_LOG_RCP_Receipt_Position_QualityControlItem> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection            managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_LOG_RCP_Receipt_Position_QualityControlItem> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_LOG_RCP_Receipt_Position_QualityControlItem>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "LOG_RCP_Receipt_Position_QualityControlItem", "ReceiptPositionCountedItemITL", "Receipt_Position_RefID", "Quantity", "BatchNumber", "SerialKey", "ExpiryDate", "Target_WRH_Shelf_RefID", "QualityControl_PerformedByBusinessParticipant_RefID", "QualityControl_PerformedAtDate", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_LOG_RCP_Receipt_Position_QualityControlItem item = new ORM_LOG_RCP_Receipt_Position_QualityControlItem();
                        //0:Parameter LOG_RCP_Receipt_Position_QualityControlItem of type Guid
                        item.LOG_RCP_Receipt_Position_QualityControlItem = reader.GetGuid(0);
                        //1:Parameter ReceiptPositionCountedItemITL of type String
                        item.ReceiptPositionCountedItemITL = reader.GetString(1);
                        //2:Parameter Receipt_Position_RefID of type Guid
                        item.Receipt_Position_RefID = reader.GetGuid(2);
                        //3:Parameter Quantity of type Double
                        item.Quantity = reader.GetDouble(3);
                        //4:Parameter BatchNumber of type String
                        item.BatchNumber = reader.GetString(4);
                        //5:Parameter SerialKey of type String
                        item.SerialKey = reader.GetString(5);
                        //6:Parameter ExpiryDate of type DateTime
                        item.ExpiryDate = reader.GetDate(6);
                        //7:Parameter Target_WRH_Shelf_RefID of type Guid
                        item.Target_WRH_Shelf_RefID = reader.GetGuid(7);
                        //8:Parameter QualityControl_PerformedByBusinessParticipant_RefID of type Guid
                        item.QualityControl_PerformedByBusinessParticipant_RefID = reader.GetGuid(8);
                        //9:Parameter QualityControl_PerformedAtDate of type DateTime
                        item.QualityControl_PerformedAtDate = reader.GetDate(9);
                        //10:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(10);
                        //11:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(11);
                        //12:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(12);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 13
0
            private static List <ORM_CMN_Country> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_Country> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_Country>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_CountryID", "Default_Language_RefID", "Default_Currency_RefID", "Country_Name_DictID", "Country_ISOCode_Alpha2", "Country_ISOCode_Alpha3", "Country_ISOCode_Numeric", "IsActive", "IsDefault", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_CMN_Country item = new ORM_CMN_Country();
                        //0:Parameter CMN_CountryID of type Guid
                        item.CMN_CountryID = reader.GetGuid(0);
                        //1:Parameter Default_Language_RefID of type Guid
                        item.Default_Language_RefID = reader.GetGuid(1);
                        //2:Parameter Default_Currency_RefID of type Guid
                        item.Default_Currency_RefID = reader.GetGuid(2);
                        //3:Parameter Country_Name of type Dict
                        item.Country_Name = reader.GetDictionary(3);
                        loader.Append(item.Country_Name, TableName);
                        //4:Parameter Country_ISOCode_Alpha2 of type String
                        item.Country_ISOCode_Alpha2 = reader.GetString(4);
                        //5:Parameter Country_ISOCode_Alpha3 of type String
                        item.Country_ISOCode_Alpha3 = reader.GetString(5);
                        //6:Parameter Country_ISOCode_Numeric of type int
                        item.Country_ISOCode_Numeric = reader.GetInteger(6);
                        //7:Parameter IsActive of type Boolean
                        item.IsActive = reader.GetBoolean(7);
                        //8:Parameter IsDefault of type Boolean
                        item.IsDefault = reader.GetBoolean(8);
                        //9:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(9);
                        //10:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(10);
                        //11:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(11);
                        //12:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(12);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 14
0
            private static List <ORM_LOG_WRH_Shelf_Content> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_LOG_WRH_Shelf_Content>            items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_LOG_WRH_Shelf_Content>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "LOG_WRH_Shelf_ContentID", "GlobalPropertyMatchingID", "Shelf_RefID", "Quantity_Current", "Quantity_Initial", "UsedShelfCapacityAmount", "PlacedIntoStock_Date", "ReceivedAsFulfillmentOf_ProcurementOrderHeader_RefID", "ReceivedAsFulfillmentOf_ProcurementOrderPosition_RefID", "R_ProcurementValue", "R_ProcurementValue_Currency_RefID", "Product_RefID", "Product_Variant_RefID", "Product_Release_RefID", "ReceptionDate", "IntakeIntoInventoryDate", "IsLocked", "R_ReservedQuantity", "R_FreeQuantity", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_LOG_WRH_Shelf_Content item = new ORM_LOG_WRH_Shelf_Content();
                        //0:Parameter LOG_WRH_Shelf_ContentID of type Guid
                        item.LOG_WRH_Shelf_ContentID = reader.GetGuid(0);
                        //1:Parameter GlobalPropertyMatchingID of type String
                        item.GlobalPropertyMatchingID = reader.GetString(1);
                        //2:Parameter Shelf_RefID of type Guid
                        item.Shelf_RefID = reader.GetGuid(2);
                        //3:Parameter Quantity_Current of type double
                        item.Quantity_Current = reader.GetDouble(3);
                        //4:Parameter Quantity_Initial of type double
                        item.Quantity_Initial = reader.GetDouble(4);
                        //5:Parameter UsedShelfCapacityAmount of type double
                        item.UsedShelfCapacityAmount = reader.GetDouble(5);
                        //6:Parameter PlacedIntoStock_Date of type DateTime
                        item.PlacedIntoStock_Date = reader.GetDate(6);
                        //7:Parameter ReceivedAsFulfillmentOf_ProcurementOrderHeader_RefID of type Guid
                        item.ReceivedAsFulfillmentOf_ProcurementOrderHeader_RefID = reader.GetGuid(7);
                        //8:Parameter ReceivedAsFulfillmentOf_ProcurementOrderPosition_RefID of type Guid
                        item.ReceivedAsFulfillmentOf_ProcurementOrderPosition_RefID = reader.GetGuid(8);
                        //9:Parameter R_ProcurementValue of type Decimal
                        item.R_ProcurementValue = reader.GetDecimal(9);
                        //10:Parameter R_ProcurementValue_Currency_RefID of type Guid
                        item.R_ProcurementValue_Currency_RefID = reader.GetGuid(10);
                        //11:Parameter Product_RefID of type Guid
                        item.Product_RefID = reader.GetGuid(11);
                        //12:Parameter Product_Variant_RefID of type Guid
                        item.Product_Variant_RefID = reader.GetGuid(12);
                        //13:Parameter Product_Release_RefID of type Guid
                        item.Product_Release_RefID = reader.GetGuid(13);
                        //14:Parameter ReceptionDate of type DateTime
                        item.ReceptionDate = reader.GetDate(14);
                        //15:Parameter IntakeIntoInventoryDate of type DateTime
                        item.IntakeIntoInventoryDate = reader.GetDate(15);
                        //16:Parameter IsLocked of type Boolean
                        item.IsLocked = reader.GetBoolean(16);
                        //17:Parameter R_ReservedQuantity of type double
                        item.R_ReservedQuantity = reader.GetDouble(17);
                        //18:Parameter R_FreeQuantity of type double
                        item.R_FreeQuantity = reader.GetDouble(18);
                        //19:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(19);
                        //20:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(20);
                        //21:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(21);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 15
0
            private static List <ORM_MRS_RUN_Measurement_Value> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_MRS_RUN_Measurement_Value>        items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_MRS_RUN_Measurement_Value>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "MRS_RUN_Measurement_ValueID", "Measurement_RefID", "MeasurementValue", "MeasurementTariff_RefID", "MeasuredAt_Time", "MeasuredAt_Lattitude", "MeasuredAt_Longitude", "Measurement_AcquisitionType_RefID", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_MRS_RUN_Measurement_Value item = new ORM_MRS_RUN_Measurement_Value();
                        //0:Parameter MRS_RUN_Measurement_ValueID of type Guid
                        item.MRS_RUN_Measurement_ValueID = reader.GetGuid(0);
                        //1:Parameter Measurement_RefID of type Guid
                        item.Measurement_RefID = reader.GetGuid(1);
                        //2:Parameter MeasurementValue of type double
                        item.MeasurementValue = reader.GetDouble(2);
                        //3:Parameter MeasurementTariff_RefID of type Guid
                        item.MeasurementTariff_RefID = reader.GetGuid(3);
                        //4:Parameter MeasuredAt_Time of type DateTime
                        item.MeasuredAt_Time = reader.GetDate(4);
                        //5:Parameter MeasuredAt_Lattitude of type double
                        item.MeasuredAt_Lattitude = reader.GetDouble(5);
                        //6:Parameter MeasuredAt_Longitude of type double
                        item.MeasuredAt_Longitude = reader.GetDouble(6);
                        //7:Parameter Measurement_AcquisitionType_RefID of type Guid
                        item.Measurement_AcquisitionType_RefID = reader.GetGuid(7);
                        //8:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(8);
                        //9:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(9);
                        //10:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(10);
                        //11:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(11);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 16
0
            private static List <ORM_LOG_SHP_Shipment_Header> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_LOG_SHP_Shipment_Header>          items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_LOG_SHP_Shipment_Header>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "LOG_SHP_Shipment_HeaderID", "RecipientBusinessParticipant_RefID", "Source_Warehouse_RefID", "ShipmentType_RefID", "ShipmentHeaderITL", "ShipmentHeader_Number", "Shippipng_AddressUCD_RefID", "IsPartiallyReadyForPicking", "IsReadyForPicking", "HasPickingStarted", "HasPickingFinished", "IsShipped", "IsBilled", "DemandDate", "ShipmentPriority", "IsPartialShippingAllowed", "IsManuallyCleared_ForPicking", "ShipmentHeader_ValueWithoutTax", "ShipmentHeader_Currency_RefID", "IsCustomerReturnShipment", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_LOG_SHP_Shipment_Header item = new ORM_LOG_SHP_Shipment_Header();
                        //0:Parameter LOG_SHP_Shipment_HeaderID of type Guid
                        item.LOG_SHP_Shipment_HeaderID = reader.GetGuid(0);
                        //1:Parameter RecipientBusinessParticipant_RefID of type Guid
                        item.RecipientBusinessParticipant_RefID = reader.GetGuid(1);
                        //2:Parameter Source_Warehouse_RefID of type Guid
                        item.Source_Warehouse_RefID = reader.GetGuid(2);
                        //3:Parameter ShipmentType_RefID of type Guid
                        item.ShipmentType_RefID = reader.GetGuid(3);
                        //4:Parameter ShipmentHeaderITL of type String
                        item.ShipmentHeaderITL = reader.GetString(4);
                        //5:Parameter ShipmentHeader_Number of type String
                        item.ShipmentHeader_Number = reader.GetString(5);
                        //6:Parameter Shippipng_AddressUCD_RefID of type Guid
                        item.Shippipng_AddressUCD_RefID = reader.GetGuid(6);
                        //7:Parameter IsPartiallyReadyForPicking of type Boolean
                        item.IsPartiallyReadyForPicking = reader.GetBoolean(7);
                        //8:Parameter IsReadyForPicking of type Boolean
                        item.IsReadyForPicking = reader.GetBoolean(8);
                        //9:Parameter HasPickingStarted of type Boolean
                        item.HasPickingStarted = reader.GetBoolean(9);
                        //10:Parameter HasPickingFinished of type Boolean
                        item.HasPickingFinished = reader.GetBoolean(10);
                        //11:Parameter IsShipped of type Boolean
                        item.IsShipped = reader.GetBoolean(11);
                        //12:Parameter IsBilled of type Boolean
                        item.IsBilled = reader.GetBoolean(12);
                        //13:Parameter DemandDate of type DateTime
                        item.DemandDate = reader.GetDate(13);
                        //14:Parameter ShipmentPriority of type int
                        item.ShipmentPriority = reader.GetInteger(14);
                        //15:Parameter IsPartialShippingAllowed of type Boolean
                        item.IsPartialShippingAllowed = reader.GetBoolean(15);
                        //16:Parameter IsManuallyCleared_ForPicking of type Boolean
                        item.IsManuallyCleared_ForPicking = reader.GetBoolean(16);
                        //17:Parameter ShipmentHeader_ValueWithoutTax of type Decimal
                        item.ShipmentHeader_ValueWithoutTax = reader.GetDecimal(17);
                        //18:Parameter ShipmentHeader_Currency_RefID of type Guid
                        item.ShipmentHeader_Currency_RefID = reader.GetGuid(18);
                        //19:Parameter IsCustomerReturnShipment of type Boolean
                        item.IsCustomerReturnShipment = reader.GetBoolean(19);
                        //20:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(20);
                        //21:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(21);
                        //22:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(22);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 17
0
            private static List <ORM_TMS_PRO_Feature> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_TMS_PRO_Feature> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_TMS_PRO_Feature>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "TMS_PRO_FeatureID", "IdentificationNumber", "DOC_Structure_Header_RefID", "Project_RefID", "Component_RefID", "Parent_RefID", "Type_RefID", "Status_RefID", "Name_DictID", "Description_DictID", "Feature_Deadline", "IsArchived", "CreatedByAccount_RefID", "Creation_Timestamp", "IsDeleted", "Tenant_RefID" });
                    while (reader.Read())
                    {
                        ORM_TMS_PRO_Feature item = new ORM_TMS_PRO_Feature();
                        //0:Parameter TMS_PRO_FeatureID of type Guid
                        item.TMS_PRO_FeatureID = reader.GetGuid(0);
                        //1:Parameter IdentificationNumber of type String
                        item.IdentificationNumber = reader.GetString(1);
                        //2:Parameter DOC_Structure_Header_RefID of type Guid
                        item.DOC_Structure_Header_RefID = reader.GetGuid(2);
                        //3:Parameter Project_RefID of type Guid
                        item.Project_RefID = reader.GetGuid(3);
                        //4:Parameter Component_RefID of type Guid
                        item.Component_RefID = reader.GetGuid(4);
                        //5:Parameter Parent_RefID of type Guid
                        item.Parent_RefID = reader.GetGuid(5);
                        //6:Parameter Type_RefID of type Guid
                        item.Type_RefID = reader.GetGuid(6);
                        //7:Parameter Status_RefID of type Guid
                        item.Status_RefID = reader.GetGuid(7);
                        //8:Parameter Name of type Dict
                        item.Name = reader.GetDictionary(8);
                        loader.Append(item.Name, TableName);
                        //9:Parameter Description of type Dict
                        item.Description = reader.GetDictionary(9);
                        loader.Append(item.Description, TableName);
                        //10:Parameter Feature_Deadline of type DateTime
                        item.Feature_Deadline = reader.GetDate(10);
                        //11:Parameter IsArchived of type Boolean
                        item.IsArchived = reader.GetBoolean(11);
                        //12:Parameter CreatedByAccount_RefID of type Guid
                        item.CreatedByAccount_RefID = reader.GetGuid(12);
                        //13:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(13);
                        //14:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(14);
                        //15:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(15);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw ex;
                }
                return(items);
            }
Ejemplo n.º 18
0
            private static List <ORM_TMS_PRO_DeveloperTask_Priority> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_TMS_PRO_DeveloperTask_Priority>   items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_TMS_PRO_DeveloperTask_Priority>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "TMS_PRO_DeveloperTask_PriorityID", "GlobalPropertyMatchingID", "Label_DictID", "Description_DictID", "IconLocationURL", "Priority_Colour", "Groups", "PriorityLevel", "IsPersistent", "Creation_Timestamp", "IsDeleted", "Tenant_RefID" });
                    while (reader.Read())
                    {
                        ORM_TMS_PRO_DeveloperTask_Priority item = new ORM_TMS_PRO_DeveloperTask_Priority();
                        //0:Parameter TMS_PRO_DeveloperTask_PriorityID of type Guid
                        item.TMS_PRO_DeveloperTask_PriorityID = reader.GetGuid(0);
                        //1:Parameter GlobalPropertyMatchingID of type String
                        item.GlobalPropertyMatchingID = reader.GetString(1);
                        //2:Parameter Label of type Dict
                        item.Label = reader.GetDictionary(2);
                        loader.Append(item.Label, TableName);
                        //3:Parameter Description of type Dict
                        item.Description = reader.GetDictionary(3);
                        loader.Append(item.Description, TableName);
                        //4:Parameter IconLocationURL of type String
                        item.IconLocationURL = reader.GetString(4);
                        //5:Parameter Priority_Colour of type String
                        item.Priority_Colour = reader.GetString(5);
                        //6:Parameter Groups of type String
                        item.Groups = reader.GetString(6);
                        //7:Parameter PriorityLevel of type int
                        item.PriorityLevel = reader.GetInteger(7);
                        //8:Parameter IsPersistent of type Boolean
                        item.IsPersistent = reader.GetBoolean(8);
                        //9:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(9);
                        //10:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(10);
                        //11:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(11);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw ex;
                }
                return(items);
            }
Ejemplo n.º 19
0
            private static List <ORM_CMN_STR_PPS_DailyWorkSchedule> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_STR_PPS_DailyWorkSchedule>    items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_STR_PPS_DailyWorkSchedule>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_STR_PPS_DailyWorkScheduleID", "Employee_RefID", "WorkSheduleDate", "SheduleBreakTemplate_RefID", "R_WorkDay_Start_in_sec", "R_WorkDay_End_in_sec", "R_WorkDay_Duration_in_sec", "IsBreakTimeManualySpecified", "BreakDurationTime_in_sec", "R_ContractSpecified_WorkingTime_in_sec", "WorkingSheduleComment", "ContractWorkerText", "IsWorkShedule_Confirmed", "WorkShedule_ConfirmedBy_Account_RefID", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_CMN_STR_PPS_DailyWorkSchedule item = new ORM_CMN_STR_PPS_DailyWorkSchedule();
                        //0:Parameter CMN_STR_PPS_DailyWorkScheduleID of type Guid
                        item.CMN_STR_PPS_DailyWorkScheduleID = reader.GetGuid(0);
                        //1:Parameter Employee_RefID of type Guid
                        item.Employee_RefID = reader.GetGuid(1);
                        //2:Parameter WorkSheduleDate of type DateTime
                        item.WorkSheduleDate = reader.GetDate(2);
                        //3:Parameter SheduleBreakTemplate_RefID of type Guid
                        item.SheduleBreakTemplate_RefID = reader.GetGuid(3);
                        //4:Parameter R_WorkDay_Start_in_sec of type int
                        item.R_WorkDay_Start_in_sec = reader.GetInteger(4);
                        //5:Parameter R_WorkDay_End_in_sec of type int
                        item.R_WorkDay_End_in_sec = reader.GetInteger(5);
                        //6:Parameter R_WorkDay_Duration_in_sec of type int
                        item.R_WorkDay_Duration_in_sec = reader.GetInteger(6);
                        //7:Parameter IsBreakTimeManualySpecified of type Boolean
                        item.IsBreakTimeManualySpecified = reader.GetBoolean(7);
                        //8:Parameter BreakDurationTime_in_sec of type int
                        item.BreakDurationTime_in_sec = reader.GetInteger(8);
                        //9:Parameter R_ContractSpecified_WorkingTime_in_sec of type int
                        item.R_ContractSpecified_WorkingTime_in_sec = reader.GetInteger(9);
                        //10:Parameter WorkingSheduleComment of type String
                        item.WorkingSheduleComment = reader.GetString(10);
                        //11:Parameter ContractWorkerText of type String
                        item.ContractWorkerText = reader.GetString(11);
                        //12:Parameter IsWorkShedule_Confirmed of type Boolean
                        item.IsWorkShedule_Confirmed = reader.GetBoolean(12);
                        //13:Parameter WorkShedule_ConfirmedBy_Account_RefID of type Guid
                        item.WorkShedule_ConfirmedBy_Account_RefID = reader.GetGuid(13);
                        //14:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(14);
                        //15:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(15);
                        //16:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(16);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
            private static List <ORM_ORD_PRC_RFP_PotentialSupplier_History> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection      managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_ORD_PRC_RFP_PotentialSupplier_History> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_ORD_PRC_RFP_PotentialSupplier_History>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "ORD_PRC_RFP_PotentialSupplier_HistoryID", "ORD_PRC_RFP_PotentialSupplier_RefID", "IsEvent_ProposalRequest_Sent", "IsEvent_ProposalRequest_Revoked", "IsEvent_BySupplier_ProposalRequest_ReceptionAcknowledged", "IsEvent_BySupplier_ProposalRequest_Declined", "IsEvent_ProposalResponse_Received", "IsEvent_ProposalResponse_ReceptionAcknowledged", "IsEvent_BySupplier_ProposalResponse_Revoked", "IsEvent_ProposalResponse_ModificationRequired", "IsEvent_ProposalResponse_Declined", "IsEvent_ProposalResponse_Accepted", "Proposal_Document_RefID", "Comment", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_ORD_PRC_RFP_PotentialSupplier_History item = new ORM_ORD_PRC_RFP_PotentialSupplier_History();
                        //0:Parameter ORD_PRC_RFP_PotentialSupplier_HistoryID of type Guid
                        item.ORD_PRC_RFP_PotentialSupplier_HistoryID = reader.GetGuid(0);
                        //1:Parameter ORD_PRC_RFP_PotentialSupplier_RefID of type Guid
                        item.ORD_PRC_RFP_PotentialSupplier_RefID = reader.GetGuid(1);
                        //2:Parameter IsEvent_ProposalRequest_Sent of type Boolean
                        item.IsEvent_ProposalRequest_Sent = reader.GetBoolean(2);
                        //3:Parameter IsEvent_ProposalRequest_Revoked of type Boolean
                        item.IsEvent_ProposalRequest_Revoked = reader.GetBoolean(3);
                        //4:Parameter IsEvent_BySupplier_ProposalRequest_ReceptionAcknowledged of type Boolean
                        item.IsEvent_BySupplier_ProposalRequest_ReceptionAcknowledged = reader.GetBoolean(4);
                        //5:Parameter IsEvent_BySupplier_ProposalRequest_Declined of type Boolean
                        item.IsEvent_BySupplier_ProposalRequest_Declined = reader.GetBoolean(5);
                        //6:Parameter IsEvent_ProposalResponse_Received of type Boolean
                        item.IsEvent_ProposalResponse_Received = reader.GetBoolean(6);
                        //7:Parameter IsEvent_ProposalResponse_ReceptionAcknowledged of type Boolean
                        item.IsEvent_ProposalResponse_ReceptionAcknowledged = reader.GetBoolean(7);
                        //8:Parameter IsEvent_BySupplier_ProposalResponse_Revoked of type Boolean
                        item.IsEvent_BySupplier_ProposalResponse_Revoked = reader.GetBoolean(8);
                        //9:Parameter IsEvent_ProposalResponse_ModificationRequired of type Boolean
                        item.IsEvent_ProposalResponse_ModificationRequired = reader.GetBoolean(9);
                        //10:Parameter IsEvent_ProposalResponse_Declined of type Boolean
                        item.IsEvent_ProposalResponse_Declined = reader.GetBoolean(10);
                        //11:Parameter IsEvent_ProposalResponse_Accepted of type Boolean
                        item.IsEvent_ProposalResponse_Accepted = reader.GetBoolean(11);
                        //12:Parameter Proposal_Document_RefID of type Guid
                        item.Proposal_Document_RefID = reader.GetGuid(12);
                        //13:Parameter Comment of type String
                        item.Comment = reader.GetString(13);
                        //14:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(14);
                        //15:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(15);
                        //16:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(16);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 21
0
            private static List <ORM_LOG_RCP_Receipt_Header> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_LOG_RCP_Receipt_Header>           items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_LOG_RCP_Receipt_Header>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "LOG_RCP_Receipt_HeaderID", "ReceiptHeaderITL", "IsCustomerReturnReceipt", "ExpectedDeliveryHeader_RefID", "ReceiptHeaderCurrency_RefID", "ReceiptNumber", "ProvidingSupplier_RefID", "DeliveringBusinessParticipant_RefID", "WRH_Warehouse_RefID", "DeliverySlip_Number", "DeliverySlip_Date", "DeliverySlip_Document_RefID", "IsQualityControlPerformed", "QualityControlPerformed_ByAccount_RefID", "QualityControlPerformed_AtDate", "IsPriceConditionsManuallyCleared", "PriceConditionsManuallyCleared_ByAccount_RefID", "PriceConditionsManuallyCleared_AtDate", "IsTakenIntoStock", "TakenIntoStock_ByAccount_RefID", "TakenIntoStock_AtDate", "IsReceiptForwardedToBookkeeping", "ReceiptForwardedToBookkeeping_ByAccount_RefID", "ReceiptForwardedToBookkeeping_AtDate", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_LOG_RCP_Receipt_Header item = new ORM_LOG_RCP_Receipt_Header();
                        //0:Parameter LOG_RCP_Receipt_HeaderID of type Guid
                        item.LOG_RCP_Receipt_HeaderID = reader.GetGuid(0);
                        //1:Parameter ReceiptHeaderITL of type String
                        item.ReceiptHeaderITL = reader.GetString(1);
                        //2:Parameter IsCustomerReturnReceipt of type Boolean
                        item.IsCustomerReturnReceipt = reader.GetBoolean(2);
                        //3:Parameter ExpectedDeliveryHeader_RefID of type Guid
                        item.ExpectedDeliveryHeader_RefID = reader.GetGuid(3);
                        //4:Parameter ReceiptHeaderCurrency_RefID of type Guid
                        item.ReceiptHeaderCurrency_RefID = reader.GetGuid(4);
                        //5:Parameter ReceiptNumber of type String
                        item.ReceiptNumber = reader.GetString(5);
                        //6:Parameter ProvidingSupplier_RefID of type Guid
                        item.ProvidingSupplier_RefID = reader.GetGuid(6);
                        //7:Parameter DeliveringBusinessParticipant_RefID of type Guid
                        item.DeliveringBusinessParticipant_RefID = reader.GetGuid(7);
                        //8:Parameter WRH_Warehouse_RefID of type Guid
                        item.WRH_Warehouse_RefID = reader.GetGuid(8);
                        //9:Parameter DeliverySlip_Number of type String
                        item.DeliverySlip_Number = reader.GetString(9);
                        //10:Parameter DeliverySlip_Date of type DateTime
                        item.DeliverySlip_Date = reader.GetDate(10);
                        //11:Parameter DeliverySlip_Document_RefID of type Guid
                        item.DeliverySlip_Document_RefID = reader.GetGuid(11);
                        //12:Parameter IsQualityControlPerformed of type Boolean
                        item.IsQualityControlPerformed = reader.GetBoolean(12);
                        //13:Parameter QualityControlPerformed_ByAccount_RefID of type Guid
                        item.QualityControlPerformed_ByAccount_RefID = reader.GetGuid(13);
                        //14:Parameter QualityControlPerformed_AtDate of type DateTime
                        item.QualityControlPerformed_AtDate = reader.GetDate(14);
                        //15:Parameter IsPriceConditionsManuallyCleared of type Boolean
                        item.IsPriceConditionsManuallyCleared = reader.GetBoolean(15);
                        //16:Parameter PriceConditionsManuallyCleared_ByAccount_RefID of type Guid
                        item.PriceConditionsManuallyCleared_ByAccount_RefID = reader.GetGuid(16);
                        //17:Parameter PriceConditionsManuallyCleared_AtDate of type DateTime
                        item.PriceConditionsManuallyCleared_AtDate = reader.GetDate(17);
                        //18:Parameter IsTakenIntoStock of type Boolean
                        item.IsTakenIntoStock = reader.GetBoolean(18);
                        //19:Parameter TakenIntoStock_ByAccount_RefID of type Guid
                        item.TakenIntoStock_ByAccount_RefID = reader.GetGuid(19);
                        //20:Parameter TakenIntoStock_AtDate of type DateTime
                        item.TakenIntoStock_AtDate = reader.GetDate(20);
                        //21:Parameter IsReceiptForwardedToBookkeeping of type Boolean
                        item.IsReceiptForwardedToBookkeeping = reader.GetBoolean(21);
                        //22:Parameter ReceiptForwardedToBookkeeping_ByAccount_RefID of type Guid
                        item.ReceiptForwardedToBookkeeping_ByAccount_RefID = reader.GetGuid(22);
                        //23:Parameter ReceiptForwardedToBookkeeping_AtDate of type DateTime
                        item.ReceiptForwardedToBookkeeping_AtDate = reader.GetDate(23);
                        //24:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(24);
                        //25:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(25);
                        //26:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(26);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
            private static List <ORM_RES_STR_Facade_RequiredAction> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_RES_STR_Facade_RequiredAction>    items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_RES_STR_Facade_RequiredAction>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "RES_STR_Facade_RequiredActionID", "FacadePropertyAssestment_RefID", "SelectedActionVersion_RefID", "EffectivePrice_RefID", "Action_PricePerUnit_RefID", "Action_Unit_RefID", "Action_UnitAmount", "IsCustom", "IfCustom_Name", "IfCustom_Description", "Creation_Timestamp", "IsDeleted", "Tenant_RefID", "Action_Timeframe_RefID", "Comment" });
                    while (reader.Read())
                    {
                        ORM_RES_STR_Facade_RequiredAction item = new ORM_RES_STR_Facade_RequiredAction();
                        //0:Parameter RES_STR_Facade_RequiredActionID of type Guid
                        item.RES_STR_Facade_RequiredActionID = reader.GetGuid(0);
                        //1:Parameter FacadePropertyAssestment_RefID of type Guid
                        item.FacadePropertyAssestment_RefID = reader.GetGuid(1);
                        //2:Parameter SelectedActionVersion_RefID of type Guid
                        item.SelectedActionVersion_RefID = reader.GetGuid(2);
                        //3:Parameter EffectivePrice_RefID of type Guid
                        item.EffectivePrice_RefID = reader.GetGuid(3);
                        //4:Parameter Action_PricePerUnit_RefID of type Guid
                        item.Action_PricePerUnit_RefID = reader.GetGuid(4);
                        //5:Parameter Action_Unit_RefID of type Guid
                        item.Action_Unit_RefID = reader.GetGuid(5);
                        //6:Parameter Action_UnitAmount of type Double
                        item.Action_UnitAmount = reader.GetDouble(6);
                        //7:Parameter IsCustom of type Boolean
                        item.IsCustom = reader.GetBoolean(7);
                        //8:Parameter IfCustom_Name of type String
                        item.IfCustom_Name = reader.GetString(8);
                        //9:Parameter IfCustom_Description of type String
                        item.IfCustom_Description = reader.GetString(9);
                        //10:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(10);
                        //11:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(11);
                        //12:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(12);
                        //13:Parameter Action_Timeframe_RefID of type Guid
                        item.Action_Timeframe_RefID = reader.GetGuid(13);
                        //14:Parameter Comment of type String
                        item.Comment = reader.GetString(14);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 23
0
            private static List <ORM_HEC_Patient_Diagnosis> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_HEC_Patient_Diagnosis>            items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_HEC_Patient_Diagnosis>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "HEC_Patient_DiagnosisID", "Patient_RefID", "R_IsAssumed", "R_IsNegated", "R_IsConfirmed", "R_IsActive", "R_DiagnosedOnDate", "R_ScheduledExpiryDate", "R_DeactivatedOnDate", "R_PotentialDiagnosis_RefID", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_HEC_Patient_Diagnosis item = new ORM_HEC_Patient_Diagnosis();
                        //0:Parameter HEC_Patient_DiagnosisID of type Guid
                        item.HEC_Patient_DiagnosisID = reader.GetGuid(0);
                        //1:Parameter Patient_RefID of type Guid
                        item.Patient_RefID = reader.GetGuid(1);
                        //2:Parameter R_IsAssumed of type Boolean
                        item.R_IsAssumed = reader.GetBoolean(2);
                        //3:Parameter R_IsNegated of type Boolean
                        item.R_IsNegated = reader.GetBoolean(3);
                        //4:Parameter R_IsConfirmed of type Boolean
                        item.R_IsConfirmed = reader.GetBoolean(4);
                        //5:Parameter R_IsActive of type Boolean
                        item.R_IsActive = reader.GetBoolean(5);
                        //6:Parameter R_DiagnosedOnDate of type DateTime
                        item.R_DiagnosedOnDate = reader.GetDate(6);
                        //7:Parameter R_ScheduledExpiryDate of type DateTime
                        item.R_ScheduledExpiryDate = reader.GetDate(7);
                        //8:Parameter R_DeactivatedOnDate of type DateTime
                        item.R_DeactivatedOnDate = reader.GetDate(8);
                        //9:Parameter R_PotentialDiagnosis_RefID of type Guid
                        item.R_PotentialDiagnosis_RefID = reader.GetGuid(9);
                        //10:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(10);
                        //11:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(11);
                        //12:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(12);
                        //13:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(13);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 24
0
            private static List <ORM_ORD_PRC_ProcurementOrder_Header> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_ORD_PRC_ProcurementOrder_Header>  items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_ORD_PRC_ProcurementOrder_Header>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "ORD_PRC_ProcurementOrder_HeaderID", "SupplierCustomeOrderITL", "Current_ProcurementOrderStatus_RefID", "ProcurementOrder_Number", "ProcurementOrder_Date", "CreatedBy_BusinessParticipant_RefID", "CanceledBy_BusinessParticipant_RefID", "ProcurementOrder_Currency_RefID", "ProcurementOrder_Supplier_RefID", "TotalValue_BeforeTax", "IsCreatedForExpectedDelivery", "IsCreatedDueToReturnShipment", "ApplicableSupplierPaymentCondition_RefID", "BillingAddressUCD_RefID", "ShippingAddressUCD_RefID", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_ORD_PRC_ProcurementOrder_Header item = new ORM_ORD_PRC_ProcurementOrder_Header();
                        //0:Parameter ORD_PRC_ProcurementOrder_HeaderID of type Guid
                        item.ORD_PRC_ProcurementOrder_HeaderID = reader.GetGuid(0);
                        //1:Parameter SupplierCustomeOrderITL of type String
                        item.SupplierCustomeOrderITL = reader.GetString(1);
                        //2:Parameter Current_ProcurementOrderStatus_RefID of type Guid
                        item.Current_ProcurementOrderStatus_RefID = reader.GetGuid(2);
                        //3:Parameter ProcurementOrder_Number of type String
                        item.ProcurementOrder_Number = reader.GetString(3);
                        //4:Parameter ProcurementOrder_Date of type DateTime
                        item.ProcurementOrder_Date = reader.GetDate(4);
                        //5:Parameter CreatedBy_BusinessParticipant_RefID of type Guid
                        item.CreatedBy_BusinessParticipant_RefID = reader.GetGuid(5);
                        //6:Parameter CanceledBy_BusinessParticipant_RefID of type Guid
                        item.CanceledBy_BusinessParticipant_RefID = reader.GetGuid(6);
                        //7:Parameter ProcurementOrder_Currency_RefID of type Guid
                        item.ProcurementOrder_Currency_RefID = reader.GetGuid(7);
                        //8:Parameter ProcurementOrder_Supplier_RefID of type Guid
                        item.ProcurementOrder_Supplier_RefID = reader.GetGuid(8);
                        //9:Parameter TotalValue_BeforeTax of type Decimal
                        item.TotalValue_BeforeTax = reader.GetDecimal(9);
                        //10:Parameter IsCreatedForExpectedDelivery of type Boolean
                        item.IsCreatedForExpectedDelivery = reader.GetBoolean(10);
                        //11:Parameter IsCreatedDueToReturnShipment of type Boolean
                        item.IsCreatedDueToReturnShipment = reader.GetBoolean(11);
                        //12:Parameter ApplicableSupplierPaymentCondition_RefID of type Guid
                        item.ApplicableSupplierPaymentCondition_RefID = reader.GetGuid(12);
                        //13:Parameter BillingAddressUCD_RefID of type Guid
                        item.BillingAddressUCD_RefID = reader.GetGuid(13);
                        //14:Parameter ShippingAddressUCD_RefID of type Guid
                        item.ShippingAddressUCD_RefID = reader.GetGuid(14);
                        //15:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(15);
                        //16:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(16);
                        //17:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(17);
                        //18:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(18);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 25
0
            private static List <ORM_HEC_ACT_UsedProduct> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_HEC_ACT_UsedProduct> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_HEC_ACT_UsedProduct>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "HEC_ACT_UsedProductID", "HEC_ACT_PerformedAction_RefID", "UsedIn_Procedure_RefID", "Relevant_PatientDiagnosis_RefID", "IsHealthcare", "IsHealthcareProduct", "HEC_Product_RefID", "IsSubstance", "IfSubstance_Strength", "IfSubstance_Unit_RefID", "IfSubstance_Substance_RefiD", "Quantity", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_HEC_ACT_UsedProduct item = new ORM_HEC_ACT_UsedProduct();
                        //0:Parameter HEC_ACT_UsedProductID of type Guid
                        item.HEC_ACT_UsedProductID = reader.GetGuid(0);
                        //1:Parameter HEC_ACT_PerformedAction_RefID of type Guid
                        item.HEC_ACT_PerformedAction_RefID = reader.GetGuid(1);
                        //2:Parameter UsedIn_Procedure_RefID of type Guid
                        item.UsedIn_Procedure_RefID = reader.GetGuid(2);
                        //3:Parameter Relevant_PatientDiagnosis_RefID of type Guid
                        item.Relevant_PatientDiagnosis_RefID = reader.GetGuid(3);
                        //4:Parameter IsHealthcare of type String
                        item.IsHealthcare = reader.GetString(4);
                        //5:Parameter IsHealthcareProduct of type Boolean
                        item.IsHealthcareProduct = reader.GetBoolean(5);
                        //6:Parameter HEC_Product_RefID of type Guid
                        item.HEC_Product_RefID = reader.GetGuid(6);
                        //7:Parameter IsSubstance of type Boolean
                        item.IsSubstance = reader.GetBoolean(7);
                        //8:Parameter IfSubstance_Strength of type String
                        item.IfSubstance_Strength = reader.GetString(8);
                        //9:Parameter IfSubstance_Unit_RefID of type Guid
                        item.IfSubstance_Unit_RefID = reader.GetGuid(9);
                        //10:Parameter IfSubstance_Substance_RefiD of type Guid
                        item.IfSubstance_Substance_RefiD = reader.GetGuid(10);
                        //11:Parameter Quantity of type double
                        item.Quantity = reader.GetDouble(11);
                        //12:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(12);
                        //13:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(13);
                        //14:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(14);
                        //15:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(15);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 26
0
            private static List <ORM_CMN_Address> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_Address> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_Address>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_AddressID", "Street_Name", "Street_Number", "City_AdministrativeDistrict", "City_Region", "City_Name", "City_PostalCode", "Province_Name", "Country_Name", "CareOf", "Country_ISOCode", "Province_EconomicRegion_RefID", "Lattitude", "Longitude", "POBox", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" });
                    while (reader.Read())
                    {
                        ORM_CMN_Address item = new ORM_CMN_Address();
                        //0:Parameter CMN_AddressID of type Guid
                        item.CMN_AddressID = reader.GetGuid(0);
                        //1:Parameter Street_Name of type String
                        item.Street_Name = reader.GetString(1);
                        //2:Parameter Street_Number of type String
                        item.Street_Number = reader.GetString(2);
                        //3:Parameter City_AdministrativeDistrict of type String
                        item.City_AdministrativeDistrict = reader.GetString(3);
                        //4:Parameter City_Region of type String
                        item.City_Region = reader.GetString(4);
                        //5:Parameter City_Name of type String
                        item.City_Name = reader.GetString(5);
                        //6:Parameter City_PostalCode of type String
                        item.City_PostalCode = reader.GetString(6);
                        //7:Parameter Province_Name of type String
                        item.Province_Name = reader.GetString(7);
                        //8:Parameter Country_Name of type String
                        item.Country_Name = reader.GetString(8);
                        //9:Parameter CareOf of type String
                        item.CareOf = reader.GetString(9);
                        //10:Parameter Country_ISOCode of type String
                        item.Country_ISOCode = reader.GetString(10);
                        //11:Parameter Province_EconomicRegion_RefID of type Guid
                        item.Province_EconomicRegion_RefID = reader.GetGuid(11);
                        //12:Parameter Lattitude of type double
                        item.Lattitude = reader.GetDouble(12);
                        //13:Parameter Longitude of type double
                        item.Longitude = reader.GetDouble(13);
                        //14:Parameter POBox of type String
                        item.POBox = reader.GetString(14);
                        //15:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(15);
                        //16:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(16);
                        //17:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(17);
                        //18:Parameter Modification_Timestamp of type DateTime
                        item.Modification_Timestamp = reader.GetDate(18);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
            private static List <ORM_RES_QST_Questionnaire_Version> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_RES_QST_Questionnaire_Version>    items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_RES_QST_Questionnaire_Version>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "RES_QST_Questionnaire_VersionID", "Questionnaire_RefID", "QuestionnaireVersion_Comment", "QuestionnaireVersion_VersionNumber", "IsApartmentStructureVisible", "IsStaircaseStructureVisible", "IsOutdoorFacilityVisible", "IsFacadeVisible", "IsRoofVisible", "IsAtticVisible", "IsBasementVisible", "IsHVACRVisible", "Creation_Timestamp", "IsDeleted", "Tenant_RefID" });
                    while (reader.Read())
                    {
                        ORM_RES_QST_Questionnaire_Version item = new ORM_RES_QST_Questionnaire_Version();
                        //0:Parameter RES_QST_Questionnaire_VersionID of type Guid
                        item.RES_QST_Questionnaire_VersionID = reader.GetGuid(0);
                        //1:Parameter Questionnaire_RefID of type Guid
                        item.Questionnaire_RefID = reader.GetGuid(1);
                        //2:Parameter QuestionnaireVersion_Comment of type String
                        item.QuestionnaireVersion_Comment = reader.GetString(2);
                        //3:Parameter QuestionnaireVersion_VersionNumber of type int
                        item.QuestionnaireVersion_VersionNumber = reader.GetInteger(3);
                        //4:Parameter IsApartmentStructureVisible of type Boolean
                        item.IsApartmentStructureVisible = reader.GetBoolean(4);
                        //5:Parameter IsStaircaseStructureVisible of type Boolean
                        item.IsStaircaseStructureVisible = reader.GetBoolean(5);
                        //6:Parameter IsOutdoorFacilityVisible of type Boolean
                        item.IsOutdoorFacilityVisible = reader.GetBoolean(6);
                        //7:Parameter IsFacadeVisible of type Boolean
                        item.IsFacadeVisible = reader.GetBoolean(7);
                        //8:Parameter IsRoofVisible of type Boolean
                        item.IsRoofVisible = reader.GetBoolean(8);
                        //9:Parameter IsAtticVisible of type Boolean
                        item.IsAtticVisible = reader.GetBoolean(9);
                        //10:Parameter IsBasementVisible of type Boolean
                        item.IsBasementVisible = reader.GetBoolean(10);
                        //11:Parameter IsHVACRVisible of type Boolean
                        item.IsHVACRVisible = reader.GetBoolean(11);
                        //12:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(12);
                        //13:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(13);
                        //14:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(14);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw ex;
                }
                return(items);
            }
            private static List <ORM_ORD_CUO_RFP_IssuedProposalResponse_Header> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection          managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_ORD_CUO_RFP_IssuedProposalResponse_Header> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_ORD_CUO_RFP_IssuedProposalResponse_Header>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "ORD_CUO_RFP_IssuedProposalResponse_HeaderID", "ProposalResponseHeaderITPL", "CreatedFor_RequestForProposal_Header_RefID", "DefaultCurrency_RefID", "ValidThrough", "TotalPrice_WithoutTax", "TotalPrice_IncludingTax", "ProposalResponseDocument_RefID", "IsActive", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_ORD_CUO_RFP_IssuedProposalResponse_Header item = new ORM_ORD_CUO_RFP_IssuedProposalResponse_Header();
                        //0:Parameter ORD_CUO_RFP_IssuedProposalResponse_HeaderID of type Guid
                        item.ORD_CUO_RFP_IssuedProposalResponse_HeaderID = reader.GetGuid(0);
                        //1:Parameter ProposalResponseHeaderITPL of type String
                        item.ProposalResponseHeaderITPL = reader.GetString(1);
                        //2:Parameter CreatedFor_RequestForProposal_Header_RefID of type Guid
                        item.CreatedFor_RequestForProposal_Header_RefID = reader.GetGuid(2);
                        //3:Parameter DefaultCurrency_RefID of type Guid
                        item.DefaultCurrency_RefID = reader.GetGuid(3);
                        //4:Parameter ValidThrough of type DateTime
                        item.ValidThrough = reader.GetDate(4);
                        //5:Parameter TotalPrice_WithoutTax of type Decimal
                        item.TotalPrice_WithoutTax = reader.GetDecimal(5);
                        //6:Parameter TotalPrice_IncludingTax of type Decimal
                        item.TotalPrice_IncludingTax = reader.GetDecimal(6);
                        //7:Parameter ProposalResponseDocument_RefID of type Guid
                        item.ProposalResponseDocument_RefID = reader.GetGuid(7);
                        //8:Parameter IsActive of type Boolean
                        item.IsActive = reader.GetBoolean(8);
                        //9:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(9);
                        //10:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(10);
                        //11:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(11);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }
Ejemplo n.º 29
0
            private static List <ORM_CMN_STR_SCE_StructureCalendarEvent> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection   managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_STR_SCE_StructureCalendarEvent> items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_STR_SCE_StructureCalendarEvent>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_STR_SCE_StructureCalendarEventID", "CMN_CAL_Event_RefID", "StructureEvent_Name_DictID", "StructureEvent_Description_DictID", "R_CalendarInstance_RefID", "IsHavingCapacityRestriction", "IfHavingCapacityRestriction_Restriction_RefID", "StructureCalendarEvent_Type_RefID", "IsShowingNotification", "IsWorkingDayEvent", "IsWorkingHalfDayEvent", "IsNonWorkingDay", "IsEvent_ImportedFromTemplate", "IsBusinessDay", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_CMN_STR_SCE_StructureCalendarEvent item = new ORM_CMN_STR_SCE_StructureCalendarEvent();
                        //0:Parameter CMN_STR_SCE_StructureCalendarEventID of type Guid
                        item.CMN_STR_SCE_StructureCalendarEventID = reader.GetGuid(0);
                        //1:Parameter CMN_CAL_Event_RefID of type Guid
                        item.CMN_CAL_Event_RefID = reader.GetGuid(1);
                        //2:Parameter StructureEvent_Name of type Dict
                        item.StructureEvent_Name = reader.GetDictionary(2);
                        loader.Append(item.StructureEvent_Name, TableName);
                        //3:Parameter StructureEvent_Description of type Dict
                        item.StructureEvent_Description = reader.GetDictionary(3);
                        loader.Append(item.StructureEvent_Description, TableName);
                        //4:Parameter R_CalendarInstance_RefID of type Guid
                        item.R_CalendarInstance_RefID = reader.GetGuid(4);
                        //5:Parameter IsHavingCapacityRestriction of type Boolean
                        item.IsHavingCapacityRestriction = reader.GetBoolean(5);
                        //6:Parameter IfHavingCapacityRestriction_Restriction_RefID of type Guid
                        item.IfHavingCapacityRestriction_Restriction_RefID = reader.GetGuid(6);
                        //7:Parameter StructureCalendarEvent_Type_RefID of type Guid
                        item.StructureCalendarEvent_Type_RefID = reader.GetGuid(7);
                        //8:Parameter IsShowingNotification of type Boolean
                        item.IsShowingNotification = reader.GetBoolean(8);
                        //9:Parameter IsWorkingDayEvent of type Boolean
                        item.IsWorkingDayEvent = reader.GetBoolean(9);
                        //10:Parameter IsWorkingHalfDayEvent of type Boolean
                        item.IsWorkingHalfDayEvent = reader.GetBoolean(10);
                        //11:Parameter IsNonWorkingDay of type Boolean
                        item.IsNonWorkingDay = reader.GetBoolean(11);
                        //12:Parameter IsEvent_ImportedFromTemplate of type Boolean
                        item.IsEvent_ImportedFromTemplate = reader.GetBoolean(12);
                        //13:Parameter IsBusinessDay of type Boolean
                        item.IsBusinessDay = reader.GetBoolean(13);
                        //14:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(14);
                        //15:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(15);
                        //16:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(16);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw ex;
                }
                return(items);
            }
            private static List <ORM_CMN_TRL_IntroductionRequest> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction)
            {
                CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection();
                List <ORM_CMN_TRL_IntroductionRequest>      items;

                try
                {
                    managedConnection.set(connectionString, connection, transaction);
                    var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction());

                    DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName));
                    query.SetParameters(command);

                    items = new List <ORM_CMN_TRL_IntroductionRequest>();

                    var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());
                    reader.SetOrdinals(new string[] { "CMN_TRL_IntroductionRequestID", "IntroductionRequestITL", "RequestingTenantCode", "RequestedForTenantCode", "IsApproved", "IsRejected", "IsPermanentlyRejected", "PerformedBy_Account_RefID", "PerformedDate", "RejectedReason", "RequestTitle", "RequestComment", "Creation_Timestamp", "Tenant_RefID", "IsDeleted" });
                    while (reader.Read())
                    {
                        ORM_CMN_TRL_IntroductionRequest item = new ORM_CMN_TRL_IntroductionRequest();
                        //0:Parameter CMN_TRL_IntroductionRequestID of type Guid
                        item.CMN_TRL_IntroductionRequestID = reader.GetGuid(0);
                        //1:Parameter IntroductionRequestITL of type String
                        item.IntroductionRequestITL = reader.GetString(1);
                        //2:Parameter RequestingTenantCode of type String
                        item.RequestingTenantCode = reader.GetString(2);
                        //3:Parameter RequestedForTenantCode of type String
                        item.RequestedForTenantCode = reader.GetString(3);
                        //4:Parameter IsApproved of type Boolean
                        item.IsApproved = reader.GetBoolean(4);
                        //5:Parameter IsRejected of type Boolean
                        item.IsRejected = reader.GetBoolean(5);
                        //6:Parameter IsPermanentlyRejected of type Boolean
                        item.IsPermanentlyRejected = reader.GetBoolean(6);
                        //7:Parameter PerformedBy_Account_RefID of type Guid
                        item.PerformedBy_Account_RefID = reader.GetGuid(7);
                        //8:Parameter PerformedDate of type DateTime
                        item.PerformedDate = reader.GetDate(8);
                        //9:Parameter RejectedReason of type String
                        item.RejectedReason = reader.GetString(9);
                        //10:Parameter RequestTitle of type String
                        item.RequestTitle = reader.GetString(10);
                        //11:Parameter RequestComment of type String
                        item.RequestComment = reader.GetString(11);
                        //12:Parameter Creation_Timestamp of type DateTime
                        item.Creation_Timestamp = reader.GetDate(12);
                        //13:Parameter Tenant_RefID of type Guid
                        item.Tenant_RefID = reader.GetGuid(13);
                        //14:Parameter IsDeleted of type Boolean
                        item.IsDeleted = reader.GetBoolean(14);


                        item.Status_IsAlreadySaved = true;
                        item.Status_IsDirty        = false;
                        items.Add(item);
                    }
                    reader.Close();
                    loader.Load();
                    managedConnection.commit();
                }
                catch (Exception ex)
                {
                    managedConnection.rollback();
                    throw;
                }
                return(items);
            }