protected void Page_Load(object sender, EventArgs e)
    {
        Database DB = Database.New();

        #region Event
        DBEvent DBEvent = new DBEvent(DB);
        Event = DBEvent.Get(new Guid("5F014EA2-3515-4B63-9989-F68A01043E72"));
        #endregion

        #region Search
        DBYoung DBYoung = new DBYoung(DB);
        SearchOptions = new StringBuilder();

        foreach (PMYoung Young in DBYoung.Gets())
            SearchOptions.AppendParameterizedFormat(@"
            <option value='{YoungId}' ChurchId='{ChurchId}' Name='{Name}' Surnames='{Surnames}' Email='{Email}' Facebook='{Facebook}' Birthday='{Birthday}'>{Sector} - {Church} - {CompleteName}</option>",
            "{YoungId}", Young.YoungId,
            "{ChurchId}", Young.ChurchId,
            "{Sector}", Young.Sector,
            "{Church}", Young.Church,
            "{CompleteName}", Young.Name + " " + Young.Surnames,
            "{Name}", Young.Name,
            "{Surnames}", Young.Surnames,
            "{Email}", Young.Email,
            "{Facebook}", Young.Facebook,
            "{Birthday}", Young.Birthday.FormatDate());
        #endregion

        #region Churchs
        DBChurch DBChurch = new DBChurch(DB);
        ChurchsOptions = new StringBuilder();

        foreach (PMChurch Church in DBChurch.Gets())
            ChurchsOptions.AppendParameterizedFormat(@"<option value='{ChurchId}'>{Municipality} - {Name}</option>",
            "{ChurchId}", Church.ChurchId,
            "{Municipality}", Church.Municipality,
            "{Name}", Church.Name);
        #endregion

        SendEmail();
    }
Пример #2
0
 public CMEvent()
 {
     this.Event = new PMEvent();
       this.Young = new PMYoung();
 }