예제 #1
0
 public ExportData(Events evnt, EventDay[] days, Task[] tasks, FacilityBookingConfirmed[][] facilities, Program[][] programs, Guest[][] guests, Participant[] participants
     , OptimizedBudgetItems optitems, BudgetIncome[] budgetincomes, Field[] field)
 {
     this.evnts = evnt;
     this.days = days;
     this.tasks = tasks;
     this.facilities = facilities;
     this.programs = programs;
     this.guests = guests;
     this.participants = participants;
     this.optitems = optitems;
     this.budgetincomes = budgetincomes;
     this.field = field;
 }
예제 #2
0
        public static int AddParticipant(int EventID, DAL dalDataContext, bool isPayable)
        {
            //if (!u.isAuthorized(u, EventController.GetEvent(EventID), EnumFunctions.Add_Guest))
            //    throw new FaultException<SException>(new SException(),
            //       new FaultReason("Invalid User, User Does Not Have Rights To Add Participant!"));
            try
            {
                //DAL dalDataContext = new DAL();
                Table<Participant> participants = dalDataContext.participants;
                Participant creatingParticipant = new Participant(EventID);
                creatingParticipant.Paid = !isPayable;

                participants.InsertOnSubmit(creatingParticipant);
                participants.Context.SubmitChanges();

                return creatingParticipant.ParticipantID;

            }
            catch
            {
                throw new FaultException<SException>(new SException(),
                   new FaultReason("An Error occured While Adding New Participant, Please Try Again!"));
            }
        }
예제 #3
0
 public ParticipantWithName(Participant participant, string name)
 {
     this.participant = participant;
     this.name = name;
 }