internal QuestionnaireQuestion QuestionnaireQuestion(DataRow row) { return new QuestionnaireQuestion { Id = row.ReadInt("question"), Category = row.ReadNullableTrimmedString("questioncategory"), IsMultiple = row.ReadBoolean("ismultiple"), Text = row.ReadNullableTrimmedString("questiontext"), IsNote = row.ReadBoolean("isnote"), NoteCaption = row.ReadNullableTrimmedString("notecaption") }; }
internal InvitationInfo InvitationInfo(DataRow row) { return new InvitationInfo { Id = row.ReadInt("invitation"), ObjectType = row.ReadNullableTrimmedString("objecttype"), ObjectId = row.ReadInt("objectid"), ObjectName = row.ReadNullableTrimmedString("objectname"), Language = row.ReadNullableTrimmedString("lang"), Data = row.ReadNullableTrimmedString("data"), CreateDate = row.ReadDateTime("createdate"), AccessCode = row.ReadNullableTrimmedString("accesscode"), AccessCodeExpired = row.ReadNullableDateTime("accesscodeexpdate"), CompleteDate = row.ReadNullableDateTime("completedate"), Verified = row.ReadBoolean("verified"), ShareCode = row.ReadNullableTrimmedString("sharecode"), IsSurveyed = row.ReadBoolean("is_surveyed"), IsExpired = row.ReadBoolean("is_expired"), CanSurvey = row.ReadBoolean("can_survey"), IsShared = row.ReadBoolean("is_shared"), CanShare = row.ReadBoolean("can_share") }; }
public ExcursionOrderCalculatePrice ExcursionOrderCalculatePrice(DataRow row) { return new ExcursionOrderCalculatePrice { id = row.ReadInt("excursion$inc"), name = row.ReadNullableTrimmedString("excursion$name"), date = row.ReadUnspecifiedDateTime("date"), time = row.IsNull("time$inc") ? null : new ExcursionTime { id = row.ReadInt("time$inc"), name = row.ReadNullableTrimmedString("time$name") }, language = row.IsNull("lang$inc") ? null : new Language { id = row.ReadInt("lang$inc"), name = row.ReadNullableTrimmedString("lang$name"), alias = row.ReadNullableTrimmedString("lang$alias") }, group = row.IsNull("group$inc") ? null : new ExcursionGroup { id = row.ReadInt("group$inc"), name = row.ReadNullableTrimmedString("group$name") }, departure = row.IsNull("departure$inc") ? null : new GeoArea { id = row.ReadInt("departure$inc"), name = row.ReadNullableTrimmedString("departure$name"), alias = row.ReadNullableTrimmedString("departure$alias") }, pax = new BookingPax { adult = row.ReadInt("adult", 0), child = row.ReadInt("child", 0), infant = row.ReadInt("infant", 0) }, contact = new ExcursionContact { name = row.ReadNullableTrimmedString("contact$name") }, note = row.ReadNullableTrimmedString("note"), price = row.IsNull("price") ? null : new OrderPrice { price = row.ReadDecimal("price"), currency = row.ReadNullableTrimmedString("currency$alias") }, closesaletime = row.ReadNullableUnspecifiedDateTime("closesaletime"), issaleclosed = row.ReadBoolean("isclosed"), isstopsale = row.ReadBoolean("isstopsale") }; }
public ReservationError ReservationError(DataRow row) { ReservationError result = new ReservationError { orderid = row.ReadNullableTrimmedString("orderid"), number = row.ReadInt("errnum", 0), message = row.ReadNullableTrimmedString("errmessage"), usermessage = row.ReadNullableTrimmedString("usermessage"), isstop = row.ReadBoolean("stop") }; string errortype = row.ReadNullableTrimmedString("errtype"); if (errortype != null) { string text = errortype.ToLower(); if (text != null) { if (!(text == "system")) { if (text == "user") { result.errortype = ReservationErrorType.user; } } else { result.errortype = ReservationErrorType.system; } } } return result; }
public ReservationState ReservationState(DataRow row) { return new ReservationState { claimId = row.ReadNullableInt("claim_id"), status = row.IsNull("status_id") ? null : new ReservationStatus { id = row.ReadInt("status_id"), description = row.ReadNullableTrimmedString("status_name") }, partner = row.IsNull("partner_id") ? null : new ReservationPartner { id = row.ReadInt("partner_id"), name = row.ReadNullableTrimmedString("partner_name") }, confirmation = row.IsNull("confirm_id") ? null : new ReservationConfirmStatus { id = row.ReadInt("confirm_id"), description = row.ReadNullableTrimmedString("confirm_name") }, price = (row.IsNull("payprice") || row.IsNull("payrest") || row.IsNull("paycurrency")) ? null : new ReservationPrice { total = row.ReadDecimal("payprice"), topay = row.ReadDecimal("payrest"), currency = row.ReadNullableTrimmedString("paycurrency") }, action = new ReservationAction { canshowprice = row.ReadBoolean("showprice", false), canprintvoucher = row.ReadBoolean("printvoucher", false), canpay = row.ReadBoolean("canpay", false) }, timelimit = GetClaimTimelimit(row.ReadNullableInt("claim_id")) }; }