예제 #1
0
 public Mockata.Models.RealtimeReview ConvertToMockataParameter(TNS.MVC4.Models.RealtimeReview data)
 {
     Mockata.Models.RealtimeReview result = new Mockata.Models.RealtimeReview();
     result.id = data.id;
     result.FirstAnswer = (AnswerType)Enum.Parse(typeof(AnswerType), data.FirstAnswer);
     result.SecondAnswer = (AnswerType)Enum.Parse(typeof(AnswerType), data.SecondAnswer);
     result.ThirdAnswer = (AnswerType)Enum.Parse(typeof(AnswerType), data.ThirdAnswer);
     result.TagsOfFirstAnswer = data.TagsOfFirstAnswer;
     result.TagsOfSecondAnswer = data.TagsOfSecondAnswer;
     result.TagsOfThirdAnswer = data.TagsOfThirdAnswer;
     result.CustomTagsOfFirstAnswer = data.CustomTagsOfFirstAnswer;
     result.CustomTagsOfSecondAnswer = data.CustomTagsOfSecondAnswer;
     result.CustomTagsOfThirdAnswer = data.CustomTagsOfThirdAnswer;
     result.CheckInDate = data.CheckInDate;
     result.CheckOutDate = data.CheckOutDate;
     result.HotelId = data.HotelId;
     result.BookingId = data.BookingId;
     result.Language = (LanguageType)Enum.Parse(typeof(LanguageType), data.Language);
     result.Comment = data.Comment;
     return result;
 }
예제 #2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     Mockata.Models.RealtimeReview parameter = new Mockata.Models.RealtimeReview();
     //parameter.FirstAnswer = icbeFirstAnswer.Value.ToString().ConvertToInteger();
     //parameter.SecondAnswer = icbeSecondAnswer.Value.ToString().ConvertToInteger();
     //parameter.thirdAnswer = icbeThirdAnswer.Value.ToString().ConvertToInteger();
     //parameter.tagsOfFirstAnswer = txtTagsOfFirstAnswer.Text;
     //parameter.tagsOfSecondAnswer = txtTagsOfSecondAnswer.Text;
     //parameter.tagsOfThirdAnswer = txtTagsOfThirdAnswer.Text;
     //parameter.checkInDate = string.Format("{0:yyyy-MM-dd}", deCheckIn.DateTime);
     //parameter.checkOutDate = string.Format("{0:yyyy-MM-dd}", deCheckOut.DateTime);
     //parameter.hotelId = txtHotelId.Text;
     //parameter.bookingId = txtBookingId.Text;
     //parameter.langId = txtLangId.Text;
     //parameter.siteId = txtSiteId.Text;
     Mockata.mockers.RealtimeReviewMocker mocker = new Mockata.mockers.RealtimeReviewMocker(parameter);
     string message = mocker.Mockup();
     if (!string.IsNullOrEmpty(message))
     {
         TNS.Win.Util.MessageDxUtil.ShowError(message);
     }
 }