예제 #1
0
        /// <summary>
        /// Map the fields for InitialDataSetup object
        /// </summary>
        /// <param name="reader">The SqlDataReader with the executed query result</param>
        /// <param name="prefix">A prefix used to identify fields for the InitialDataSetup model in the resultset if required</param>
        /// <returns>An instance of InitialDataSetup</returns>
        internal static InitialDataSetup MapReader(System.Data.IDataReader reader, string prefix = "")
        {
            var initialDataSetup = new InitialDataSetup();

            // Map Regionalized information
            initialDataSetup.RegionalizedInformation = MapRegionalizedInformationReader(reader);

            if (reader.NextResult())
            {
                // Map Master Data Information
                initialDataSetup.MasterDataInformation = MapMasterDataInformationReader(reader);
            }

            return initialDataSetup;
        }
 /// <summary>
 /// Converts InitialDataSetup to Dto
 /// </summary>
 /// <param name="initialDataSetup">InitialDataSetup to convert</param>
 /// <returns>InitialDataSetup Dto</returns>
 public static InitialDataSetupDto ConvertInitialDataSetupToDto(InitialDataSetup initialDataSetup)
 {
     return new InitialDataSetupDto
     {
         RegionalizedInformation =
             ConvertRegionalizedInformationToDto(initialDataSetup.RegionalizedInformation),
         MasterDataInformation =
             ConvertMasterDataInformationToDto(initialDataSetup.MasterDataInformation)
     };
 }