Exemplo n.º 1
0
 /*将AvailableDate对应的Entity翻译为数据契约*/
 private void TranslateAvailableDateEntityToAvailableDateContractData(
     AvailableDateEntity availableDateEntity, 
     AvailableDate       availableDate) {
         availableDate.ErrorMessage = availableDateEntity.ErrorMessage;
         availableDate.Capacity = availableDateEntity.Capacity;
         availableDate.Count = availableDateEntity.Count;
         availableDate.date = availableDateEntity.date;
         availableDate.appointed = availableDateEntity.appointed;
 }
Exemplo n.º 2
0
        /*查询医生最近可以预约的时间段*/
        public AvailableDate GetAvailableDate(string doctorID) {
            AvailableDateEntity availableDateEntity = null;

            if (doctorID == null) {
                availableDateEntity = new AvailableDateEntity();
                availableDateEntity.ErrorMessage = "415 Empty DoctorID! @Service";
            }
            else {
                availableDateEntity = userLogic.GetAvailableDate(doctorID);
            }

            AvailableDate availableDate = new AvailableDate();
            TranslateAvailableDateEntityToAvailableDateContractData(availableDateEntity, availableDate);

            return availableDate;
        }