protected void rgFont_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { DayCareBAL.FontService proxyFont = new DayCareBAL.FontService(); rgFont.DataSource = proxyFont.LoadFont(); }
public void LoadSchoolInfo(Guid SchoolId) { DayCarePL.Logger.Write(DayCarePL.LogType.INFO, DayCarePL.ModuleToLog.School, "LoadSchoolInfo", "LoadSchoolInfo called", DayCarePL.Common.GUID_DEFAULT); try { DayCarePL.Logger.Write(DayCarePL.LogType.DEBUG, DayCarePL.ModuleToLog.School, "LoadSchoolInfo", "Debug LoadSchoolInfo Of Role", DayCarePL.Common.GUID_DEFAULT); DayCareBAL.SchoolService proxySchoolService = new DayCareBAL.SchoolService(); DayCarePL.SchoolProperties objSchool = proxySchoolService.LoadSchoolInfo(SchoolId); DayCareBAL.FontService proxyFontService = new DayCareBAL.FontService(); DayCarePL.FontProperties[] lstFont = proxyFontService.LoadFont(); if (objSchool != null) { if (!string.IsNullOrEmpty(objSchool.iPadBackgroundImage)) { imgSchholImage.ImageUrl = "../StaffImages/" + objSchool.iPadBackgroundImage; } else { imgSchholImage.ImageUrl = "../StaffImages/Filetype-Blank-Alt-icon.png"; } txtName.Text = objSchool.Name; txtAddress1.Text = objSchool.Address1; txtAddress2.Text = objSchool.Address2; txtCity.Text = objSchool.City; txtZip.Text = objSchool.Zip; ddlCountry.SelectedValue = objSchool.CountryId.ToString(); if (!objSchool.CountryId.ToString().Equals(DayCarePL.Common.GUID_DEFAULT)) { Common.BindStateDropDown(ddlState, objSchool.CountryId.ToString()); } if (ddlState.Items != null && ddlState.Items.Count > 0) { ddlState.SelectedValue = objSchool.StateId.ToString(); } txtMainPhone.Text = objSchool.MainPhone; txtSecondaryPhone.Text = objSchool.SecondaryPhone; txtFax.Text = objSchool.Fax; txtEmail.Text = objSchool.Email; txtWebSite.Text = objSchool.WebSite; chkCodeRequire.Checked = objSchool.CodeRequired; if (objSchool.LateFeeAmount != null) { txtLateFee.Text = objSchool.LateFeeAmount.ToString(); } txtiPadHeader.Text = objSchool.iPadHeader; //txtiPadHeaderFont.Text = objSchool.iPadHeaderFont; //txtiPadHeaderFontSize.Text = objSchool.iPadHeaderFontSize.HasValue ? objSchool.iPadHeaderFontSize.ToString() : "0"; lbliPadHeaderColor.BackColor = System.Drawing.ColorTranslator.FromHtml(objSchool.iPadHeaderColor); rcpiPadHeaderColor.SelectedColor = System.Drawing.ColorTranslator.FromHtml(objSchool.iPadHeaderColor); txtiPadMessage.Text = objSchool.iPadMessage; //txtiPadMessageFont.Text = objSchool.iPadMessageFont; //txtiPadMessageFontSize.Text = objSchool.iPadMessageFontSize.HasValue ? objSchool.iPadMessageFontSize.ToString() : "0"; ; lbliPadBackgroundImage.Text = objSchool.iPadBackgroundImage; lbliPadMessageColor.BackColor = System.Drawing.ColorTranslator.FromHtml(objSchool.iPadMessageColor); rcpiPadMessageColor.SelectedColor = System.Drawing.ColorTranslator.FromHtml(objSchool.iPadMessageColor); if (lstFont != null && lstFont.Count() > 0) { ddliPadHeaderFont.Items.Clear(); ddliPadMessageFont.Items.Clear(); foreach (DayCarePL.FontProperties objFont in lstFont) { ddliPadHeaderFont.Items.Add(new ListItem(objFont.Name, objFont.Name)); ddliPadMessageFont.Items.Add(new ListItem(objFont.Name, objFont.Name)); } ddliPadHeaderFont.Items.Insert(0, new ListItem("--Select--", "-1")); ddliPadMessageFont.Items.Insert(0, new ListItem("--Select--", "-1")); } if (!string.IsNullOrEmpty(objSchool.iPadHeaderFont)) { ddliPadHeaderFont.SelectedValue = objSchool.iPadHeaderFont; } else { ddliPadHeaderFont.SelectedIndex = 0; } if (objSchool.iPadHeaderFontSize != null) { ddliPadHeaderFontSize.SelectedValue = objSchool.iPadHeaderFontSize.ToString(); } else { ddliPadHeaderFontSize.SelectedIndex = 0; } if (!string.IsNullOrEmpty(objSchool.iPadMessageFont)) { ddliPadMessageFont.SelectedValue = objSchool.iPadMessageFont; } else { ddliPadMessageFont.SelectedIndex = 0; } if (objSchool.iPadMessageFontSize != null) { ddliPadMessageFontSize.SelectedValue = objSchool.iPadMessageFontSize.ToString(); } else { ddliPadMessageFontSize.SelectedIndex = 0; } } } catch (Exception ex) { } }