public SpecialHandlingCode GetRecordSpecialHandlingCode(string recordID, string UserSNo)
        {
            SqlDataReader dr = null;

            try
            {
                SpecialHandlingCode g          = new SpecialHandlingCode();
                SqlParameter[]      Parameters = { new SqlParameter("@SNo", Convert.ToInt32(recordID)), new SqlParameter("@UserID", Convert.ToInt32(UserSNo)) };
                dr = SqlHelper.ExecuteReader(ReadConnectionString.WebConfigConnectionString, CommandType.StoredProcedure, "GetRecordSPHC", Parameters);

                if (dr.Read())
                {
                    g.SNo                     = Convert.ToInt32(dr["SNo"]);
                    g.Code                    = dr["Code"].ToString().ToString().ToUpper();
                    g.IsDGR                   = Convert.ToBoolean(dr["IsDGR"]);
                    g.DGR                     = dr["DGR"].ToString().ToUpper();
                    g.Description             = dr["Description"].ToString().ToUpper();
                    g.IsShownInNOTOC          = Convert.ToBoolean(dr["IsShownInNOTOC"].ToString());
                    g.ShownInNOTOC            = dr["ShownInNOTOC"].ToString().ToUpper();
                    g.IsHeavyWeightExempt     = Convert.ToBoolean(dr["IsHeavyWeightExempt"].ToString());
                    g.HeavyWeightExempt       = dr["HeavyWeightExempt"].ToString().ToUpper();
                    g.IsExpress               = Convert.ToBoolean(dr["IsExpress"].ToString());
                    g.Express                 = dr["Express"].ToString().ToUpper();
                    g.Priority                = Decimal.Parse(dr["Priority"].ToString()); //Convert.ToDecimal("10.00");
                    g.IsActive                = Convert.ToBoolean(dr["IsActive"].ToString());
                    g.Active                  = dr["Active"].ToString().ToUpper();
                    g.IsTemperatureControlled = Convert.ToBoolean(dr["IsTemperatureControlled"].ToString());
                    g.TemperatureControlled   = dr["TemperatureControlled"].ToString().ToUpper();
                    g.ExpressDelivery         = dr["IsExpressDelivery"].ToString() == "No" ? "NO" : "YES";
                    g.IsExpressDelivery       = Convert.ToBoolean(dr["ExpressDelivery"]) == false ? false : true;
                    g.DGClass                 = dr["DGClass"] == DBNull.Value ? 0 : Convert.ToInt32(dr["DGClass"]);
                    g.Divisions               = dr["Division"].ToString().ToUpper();
                    g.Text_DGClass            = dr["Text_DGClass"].ToString().ToUpper();
                    g.Text_Divisions          = dr["Text_Division"].ToString().ToUpper();
                    g.SHCStatement            = dr["SHCStatement"].ToString().ToUpper();
                    g.MandatoryStatement      = dr["MandatoryStatement"].ToString().ToUpper();
                    g.StatementLabel          = dr["StatementLabel"].ToString().ToUpper();
                    g.PackingInstructionLabel = dr["PackingInstructionLabel"].ToString().ToUpper();
                    g.IsAllowLateAcceptance   = Convert.ToBoolean(dr["IsAllowLateAcceptance"].ToString());
                    g.AllowLateAcceptance     = dr["AllowLateAcceptance"].ToString().ToUpper();
                    g.UpdatedBy               = dr["UpdatedUser"].ToString();
                    g.CreatedBy               = dr["CreatedUser"].ToString();
                }
                dr.Close();
                return(g);
            }
            catch (Exception ex)//
            {
                dr.Close();
                throw ex;
            }
        }
Example #2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 39, Configuration.FieldSeparator),
                       Id,
                       ItemIdentifier?.ToDelimitedString(),
                       ItemDescription,
                       ItemStatus?.ToDelimitedString(),
                       ItemType?.ToDelimitedString(),
                       ItemCategory?.ToDelimitedString(),
                       SubjectToExpirationIndicator?.ToDelimitedString(),
                       ManufacturerIdentifier?.ToDelimitedString(),
                       ManufacturerName,
                       ManufacturerCatalogNumber,
                       ManufacturerLabelerIdentificationCode?.ToDelimitedString(),
                       PatientChargeableIndicator?.ToDelimitedString(),
                       TransactionCode?.ToDelimitedString(),
                       TransactionAmountUnit?.ToDelimitedString(),
                       StockedItemIndicator?.ToDelimitedString(),
                       SupplyRiskCodes?.ToDelimitedString(),
                       ApprovingRegulatoryAgency != null ? string.Join(Configuration.FieldRepeatSeparator, ApprovingRegulatoryAgency.Select(x => x.ToDelimitedString())) : null,
                       LatexIndicator?.ToDelimitedString(),
                       RulingAct != null ? string.Join(Configuration.FieldRepeatSeparator, RulingAct.Select(x => x.ToDelimitedString())) : null,
                       ItemNaturalAccountCode?.ToDelimitedString(),
                       ApprovedToBuyQuantity.HasValue ? ApprovedToBuyQuantity.Value.ToString(Consts.NumericFormat, culture) : null,
                       ApprovedToBuyPrice?.ToDelimitedString(),
                       TaxableItemIndicator?.ToDelimitedString(),
                       FreightChargeIndicator?.ToDelimitedString(),
                       ItemSetIndicator?.ToDelimitedString(),
                       ItemSetIdentifier?.ToDelimitedString(),
                       TrackDepartmentUsageIndicator?.ToDelimitedString(),
                       ProcedureCode?.ToDelimitedString(),
                       ProcedureCodeModifier != null ? string.Join(Configuration.FieldRepeatSeparator, ProcedureCodeModifier.Select(x => x.ToDelimitedString())) : null,
                       SpecialHandlingCode?.ToDelimitedString(),
                       HazardousIndicator?.ToDelimitedString(),
                       SterileIndicator?.ToDelimitedString(),
                       MaterialDataSafetySheetNumber?.ToDelimitedString(),
                       UnitedNationsStandardProductsAndServicesCode?.ToDelimitedString(),
                       ContractDate?.ToDelimitedString(),
                       ManufacturerContactName?.ToDelimitedString(),
                       ManufacturerContactInformation?.ToDelimitedString(),
                       ClassOfTrade,
                       FieldLevelEventCode
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Example #3
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 45, Configuration.FieldSeparator),
                       Id,
                       ExternalAccessionIdentifier?.ToDelimitedString(),
                       AccessionIdentifier?.ToDelimitedString(),
                       ContainerIdentifier?.ToDelimitedString(),
                       PrimaryParentContainerIdentifier?.ToDelimitedString(),
                       EquipmentContainerIdentifier?.ToDelimitedString(),
                       SpecimenSource?.ToDelimitedString(),
                       RegistrationDateTime.HasValue ? RegistrationDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ContainerStatus?.ToDelimitedString(),
                       CarrierType?.ToDelimitedString(),
                       CarrierIdentifier?.ToDelimitedString(),
                       PositionInCarrier?.ToDelimitedString(),
                       TrayTypeSac?.ToDelimitedString(),
                       TrayIdentifier?.ToDelimitedString(),
                       PositionInTray?.ToDelimitedString(),
                       Location != null ? string.Join(Configuration.FieldRepeatSeparator, Location.Select(x => x.ToDelimitedString())) : null,
                       ContainerHeight.HasValue ? ContainerHeight.Value.ToString(Consts.NumericFormat, culture) : null,
                       ContainerDiameter.HasValue ? ContainerDiameter.Value.ToString(Consts.NumericFormat, culture) : null,
                       BarrierDelta.HasValue ? BarrierDelta.Value.ToString(Consts.NumericFormat, culture) : null,
                       BottomDelta.HasValue ? BottomDelta.Value.ToString(Consts.NumericFormat, culture) : null,
                       ContainerHeightDiameterDeltaUnits?.ToDelimitedString(),
                       ContainerVolume.HasValue ? ContainerVolume.Value.ToString(Consts.NumericFormat, culture) : null,
                       AvailableSpecimenVolume.HasValue ? AvailableSpecimenVolume.Value.ToString(Consts.NumericFormat, culture) : null,
                       InitialSpecimenVolume.HasValue ? InitialSpecimenVolume.Value.ToString(Consts.NumericFormat, culture) : null,
                       VolumeUnits?.ToDelimitedString(),
                       SeparatorType?.ToDelimitedString(),
                       CapType?.ToDelimitedString(),
                       Additive != null ? string.Join(Configuration.FieldRepeatSeparator, Additive.Select(x => x.ToDelimitedString())) : null,
                       SpecimenComponent?.ToDelimitedString(),
                       DilutionFactor?.ToDelimitedString(),
                       Treatment?.ToDelimitedString(),
                       Temperature?.ToDelimitedString(),
                       HemolysisIndex.HasValue ? HemolysisIndex.Value.ToString(Consts.NumericFormat, culture) : null,
                       HemolysisIndexUnits?.ToDelimitedString(),
                       LipemiaIndex.HasValue ? LipemiaIndex.Value.ToString(Consts.NumericFormat, culture) : null,
                       LipemiaIndexUnits?.ToDelimitedString(),
                       IcterusIndex.HasValue ? IcterusIndex.Value.ToString(Consts.NumericFormat, culture) : null,
                       IcterusIndexUnits?.ToDelimitedString(),
                       FibrinIndex.HasValue ? FibrinIndex.Value.ToString(Consts.NumericFormat, culture) : null,
                       FibrinIndexUnits?.ToDelimitedString(),
                       SystemInducedContaminants != null ? string.Join(Configuration.FieldRepeatSeparator, SystemInducedContaminants.Select(x => x.ToDelimitedString())) : null,
                       DrugInterference != null ? string.Join(Configuration.FieldRepeatSeparator, DrugInterference.Select(x => x.ToDelimitedString())) : null,
                       ArtificialBlood?.ToDelimitedString(),
                       SpecialHandlingCode != null ? string.Join(Configuration.FieldRepeatSeparator, SpecialHandlingCode.Select(x => x.ToDelimitedString())) : null,
                       OtherEnvironmentalFactors != null ? string.Join(Configuration.FieldRepeatSeparator, OtherEnvironmentalFactors.Select(x => x.ToDelimitedString())) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }