コード例 #1
0
ファイル: Service.cs プロジェクト: UCN3semGRP2/potlog
 public Event CreateEvent(string title, string description, int numOfParticipants, double priceFrom, double priceTo, string location, DateTime datetime, bool isPublic, User admin)
 {
     try
     {
         Event        e = eCtrl.CreateEvent(title, description, numOfParticipants, priceFrom, priceTo, location, datetime, isPublic, admin);
         Registration r = rCtrl.CreateRegistration(e.Admin, e);
         uCtrl.AddRegistration(e.Admin, r);
         return(e);
     }
     catch (ArgumentException ae)
     {
         throw new FaultException(ae.Message);
     }
     catch (DateInPastException dipe)
     {
         throw new FaultException(dipe.Message);
     }
 }