public RoomRecord(RoomRecordData data) { Id = data.Id; RoomIndex = data.RoomIndex; RoommerName = data.RoommerName; RoommerNum = data.RoommerNum; CreateDate = data.CreateDate; CheckInDate = data.CheckInDate; CheckOutDate = data.CheckOutDate; State = data.State; Price = data.Price; PayRecords = data.PayRecords; RecordPhase = ERecordPhase.Valid; }
public RoomRecordData GetData(RoomRecordData data = null) { if (data == null) { data = new RoomRecordData(); } data.Id = Id; data.RoomIndex = RoomIndex; data.RoommerName = RoommerName; data.RoommerNum = RoommerNum; data.CreateDate = CreateDate; data.CheckInDate = CheckInDate; data.CheckOutDate = CheckOutDate; data.State = State; data.Price = Price; data.PayRecords = PayRecords; return(data); }