loadForm method

void loadForm(
  1. UHotelReservationResponse? i
)

Implementation

void loadForm(UHotelReservationResponse? i) {
  editing = i;
  formRoom = room;
  formUser = null;
  checkIn = i?.checkInDate;
  checkOut = i?.checkOutDate;
  checkInController.text = i?.checkInDate.toJalaliDate() ?? "";
  checkOutController.text = i?.checkOutDate.toJalaliDate() ?? "";
  guestCountController.text = (i?.guestCount ?? 1).toString();
  totalPriceController.text = i?.totalPrice.toInt().toString() ?? "";
  penaltyController.clear();
  guestNameController.text = i?.jsonData.guestName ?? "";
  guestPhoneController.text = i?.jsonData.guestPhone ?? "";
  notesController.text = i?.jsonData.notes ?? "";
}