/// <summary> /// Shows the thumbnail image of the item as a tooltip. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ToolTipUpdateEventArgs" /> instance containing the event data.</param> protected void tooltipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { if (!PageBase.StopProcessing) { int itemId = 0; if (int.TryParse(e.Value, out itemId)) { var item = GetBL <InventoryBL>().GetItem(itemId); if (item != null && item.Code.SortOrder >= GetBL <InventoryBL>().GetUserInventoryVisibilityLevel(item.CompanyId.Value, this.UserID, item.LocationId, false).SortOrder) { InventoryBusinessCard businessCard = (InventoryBusinessCard)LoadControl("~/Controls/Inventory/InventoryBusinessCard.ascx"); businessCard.ItemId = itemId; businessCard.RelatedTable = "Item"; businessCard.LoadData(); e.UpdatePanel.ContentTemplateContainer.Controls.Add(businessCard); } else { Literal ltrlMessage = new Literal(); Data.User locationManager = GetBL <InventoryBL>().GetContactBookingManager(item.CompanyId.Value, item.LocationId); ltrlMessage.Text = string.Format("<div style='padding:20px 10px;'>The visibility settings for this Item have just been changed." + "You will not have access to this Item. Please contact your Booking Manager, {0} {1}, if you have any questions.<div>", locationManager.FirstName, locationManager.LastName); e.UpdatePanel.ContentTemplateContainer.Controls.Add(ltrlMessage); } } } }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e) { OrderDetailToolTipControl ctrl = Page.LoadControl("/Product/Controls/OrderDetailToolTipControl.ascx") as OrderDetailToolTipControl; ctrl.ID = "UcOrderDetail1"; ctrl.OrderId = Convert.ToInt32(e.Value); e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl); }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) { System.Web.UI.Control ctrl = Page.LoadControl("~/Controls/Diagram.ascx"); ctrl.ID = "UcInfoCustomers1"; args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl); Controls_Diagram details = (Controls_Diagram)ctrl; details.TransactionEntryID = int.Parse(args.Value); }
protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { int aptId; Appointment apt; if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string apt = RadScheduler1.Appointments.FindByID(e.Value); else //The appointment is not occurrence and FindByID expects an int apt = RadScheduler1.Appointments.FindByID(aptId); UserControls_IsTakvimi_AppointmentToolTip toolTip = (UserControls_IsTakvimi_AppointmentToolTip)LoadControl("AppointmentToolTip.ascx"); toolTip.TargetAppointment = apt; e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip); }
protected void EventToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { var appointment = EventScheduler.Appointments.FirstOrDefault(apt => apt.ID.ToString().Equals(e.Value)); if (appointment == null) { return; } var toolTip = (EventToolTip)LoadControl("UserControl/EventToolTip.ascx"); toolTip.TargetAppointment = appointment; e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip); }
/// <summary> /// Shows the thumbnail image of the item as a tooltip. /// </summary> protected void tooltipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { int thumbnailMediaId = 0; int.TryParse(e.Value, out thumbnailMediaId); using (ImageDisplay image = new ImageDisplay()) { image.DocumentMediaId = thumbnailMediaId; image.ShowImagePreview = false; e.UpdatePanel.ContentTemplateContainer.Controls.Add(image); } }
/// <summary> /// Handles the <see cref="RadToolTipManager.AjaxUpdate"/> event of the <see cref="AppointmentToolTipManager"/> control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Telerik.Web.UI.ToolTipUpdateEventArgs"/> instance containing the event data.</param> private void AppointmentToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { int appointmentId; if (int.TryParse(e.Value.Split('_')[0], NumberStyles.Integer, CultureInfo.InvariantCulture, out appointmentId)) { Appointment appointment = Appointment.Load(appointmentId); AppointmentToolTip toolTip = (AppointmentToolTip)this.LoadControl("AppointmentToolTip.ascx"); toolTip.ModuleConfiguration = this.ModuleConfiguration; toolTip.SetAppointment(appointment); e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip); } }
protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { int aptId; Appointment apt; if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string { apt = RadScheduler1.Appointments.FindByID(e.Value); } else //The appointment is not occurrence and FindByID expects an int { apt = RadScheduler1.Appointments.FindByID(aptId); } UserControls_IsTakvimi_AppointmentToolTip toolTip = (UserControls_IsTakvimi_AppointmentToolTip)LoadControl("AppointmentToolTip.ascx"); toolTip.TargetAppointment = apt; e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip); }
/// <summary> /// Handles the AjaxUpdate event of the EventsCalendarToolTipManager control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Telerik.Web.UI.ToolTipUpdateEventArgs"/> instance containing the event data.</param> private void EventsCalendarToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { // Value is ID_# when when the appointment is a recurrence, but just ID when it's not int eventId; DateTime?occurrenceDate = null; if (!int.TryParse(e.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out eventId)) { var appointment = this.EventsCalendarDisplay.Appointments.FindByID(e.Value); eventId = (int)appointment.RecurrenceParentID; occurrenceDate = appointment.Start; } var @event = Event.Load(eventId); this.ToolTipEventId = eventId; this.ToolTipEventOccurrenceDate = occurrenceDate; this.ShowToolTip(@event, occurrenceDate, e.UpdatePanel); }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) { //this.UpdateToolTip(args.Value, args.UpdatePanel); /* * int aptId; * Appointment apt; * if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string * apt = RadScheduler1.Appointments.FindByID(e.Value); * else //The appointment is not occurrence and FindByID expects an int * apt = RadScheduler1.Appointments.FindByID(aptId); * UserControls_IsTakvimi_AppointmentToolTip toolTip = (UserControls_IsTakvimi_AppointmentToolTip)LoadControl("AppointmentToolTip.ascx"); * toolTip.TargetAppointment = apt; * e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip); */ //UserControls_Istek_IstekDetay IstDetay = (UserControls_Istek_IstekDetay)LoadControl("IstekDetay.ascx"); //IstDetay.IstId= 456; //args.UpdatePanel.ContentTemplateContainer.Controls.Add(IstDetay); this.UpdateToolTip(int.Parse(args.Value), args.UpdatePanel); }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e) { string[] tooltipId = e.TargetControlID.Split(new char[] { '_' }); if (tooltipId.Length == 4) { Literal literal = new Literal { Text = AdWordHelper.GetCampaignContent(new Guid(tooltipId[0]), new Guid(tooltipId[1]), UserDataContext.GetUserDataContext(), tooltipId[2], "Popup") }; literal.Text = Regex.Replace(literal.Text, @"(/Pages/Other/AdCampaignRedirecter.aspx\?CID=\w{8}-\w{4}-\w{4}-\w{4}-\w{12})", "$1&OID=" + tooltipId[1] + "&Word=" + tooltipId[2] + "&Type=PopupLink"); e.UpdatePanel.ContentTemplateContainer.Controls.Add(literal); } }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e) { string[] tooltipId = e.TargetControlID.Split(new char[] { '_' }); if (tooltipId.Length == 4) { Literal literal = new Literal { Text = AdWordHelper.GetCampaignContent(new Guid(tooltipId[0]), new Guid(tooltipId[1]), UserDataContext.GetUserDataContext(), tooltipId[2], "Popup") }; literal.Text = Regex.Replace(literal.Text, @"(/Pages/Other/AdCampaignRedirecter.aspx\?CID=\w{8}-\w{4}-\w{4}-\w{4}-\w{12})", "$1&OID=" + tooltipId[1] + "&Word=" + tooltipId[2] + "&Type=PopupLink"); e.UpdatePanel.ContentTemplateContainer.Controls.Add(literal); } else if (e.TargetControlID.IndexOf("Img_") > -1) { try { string pictureId = e.TargetControlID.Substring(4); DataObjectPicture picture = prodPictures.Find(x => x.ObjectID.Value == pictureId.ToGuid()); Literal literal = new Literal { Text = string.Format( "<div><div><img src=\"{0}{1}\"></div><div>{2}</div></div>", SiteConfig.MediaDomainName, picture.GetImage(PictureVersion.L), picture.Title) }; e.UpdatePanel.ContentTemplateContainer.Controls.Add(literal); } catch { } } }
/// <summary> /// Called when [ajax update]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="Telerik.Web.UI.ToolTipUpdateEventArgs"/> instance containing the event data.</param> protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) { UpdateToolTip(args.UpdatePanel); }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) { //this.UpdateToolTip(args.Value, args.UpdatePanel); /* int aptId; Appointment apt; if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string apt = RadScheduler1.Appointments.FindByID(e.Value); else //The appointment is not occurrence and FindByID expects an int apt = RadScheduler1.Appointments.FindByID(aptId); UserControls_IsTakvimi_AppointmentToolTip toolTip = (UserControls_IsTakvimi_AppointmentToolTip)LoadControl("AppointmentToolTip.ascx"); toolTip.TargetAppointment = apt; e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip); */ //UserControls_Istek_IstekDetay IstDetay = (UserControls_Istek_IstekDetay)LoadControl("IstekDetay.ascx"); //IstDetay.IstId= 456; //args.UpdatePanel.ContentTemplateContainer.Controls.Add(IstDetay); this.UpdateToolTip(int.Parse(args.Value), args.UpdatePanel); }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) { this.UpdateToolTip(args.Value, args.UpdatePanel); }
// //DLC_COURSE_SCHEDULE _obj_Dlc_Course_Schedule = new DLC_COURSE_SCHEDULE(); // //_obj_Dlc_Course_Schedule.COURSESHD_ROOM_ID = Convert.ToInt32(rcmb_RoomNo.SelectedValue); // //_obj_Dlc_Course_Schedule.COURSESHD_STARTDATE = Convert.ToDateTime(radStartDate.SelectedDate); // //_obj_Dlc_Course_Schedule.COURSESHD_ENDDATE = Convert.ToDateTime(rdpEndDate.SelectedDate); // //_obj_Dlc_Course_Schedule.COURSESHD_LOCATION_ID = Convert.ToInt32(rcmb_LocationName.SelectedValue); // //DataTable dt = new DataTable(); // //dt = Admin_Bll.CourseTimeTable(_obj_Dlc_Course_Schedule); // //for (int i = 0; i < dt.Rows.Count; i++) // //{ // // int a = Convert.ToInt32(dt.Rows[i]["COURSESHD_ID"].ToString()); // // string b = Convert.ToString(dt.Rows[i]["COURSESHD_NAME"].ToString()); // // // string c = Convert.ToString(dt.Rows[i]["COURSESHD_AMOUNT"].ToString()); // // RadScheduler1.InsertAppointment(new Appointment(a, Convert.ToDateTime(dt.Rows[i]["COURSESHD_STARTTIME"].ToString()), Convert.ToDateTime(dt.Rows[i]["COURSESHD_ENDTIME"].ToString()), b)); // //} protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { }
/// <summary> /// Handles the <see cref="RadToolTipManager.AjaxUpdate"/> event of the <see cref="AppointmentToolTipManager"/> control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Telerik.Web.UI.ToolTipUpdateEventArgs"/> instance containing the event data.</param> private void AppointmentToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { int appointmentId; if (int.TryParse(e.Value.Split('_')[0], NumberStyles.Integer, CultureInfo.InvariantCulture, out appointmentId)) { Appointment appointment = Appointment.Load(appointmentId); AppointmentToolTip toolTip = (AppointmentToolTip)this.LoadControl("AppointmentToolTip.ascx"); toolTip.ModuleConfiguration = this.ModuleConfiguration; toolTip.SetAppointment(appointment); e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip); } }
protected void rttmSecuancias_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { this.UpdateToolTip(e.Value, e.UpdatePanel); }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) { Timer1.Enabled = false; UpdateToolTip(args.Value, args.UpdatePanel); }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e) { this.UpdateToolTip(e.Value, e.UpdatePanel); }
/// <summary> /// Handles the AjaxUpdate event of the EventsCalendarToolTipManager control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Telerik.Web.UI.ToolTipUpdateEventArgs"/> instance containing the event data.</param> private void EventsCalendarToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) { // Value is ID_# when when the appointment is a recurrence, but just ID when it's not int eventId; DateTime? occurrenceDate = null; if (!int.TryParse(e.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out eventId)) { var appointment = this.EventsCalendarDisplay.Appointments.FindByID(e.Value); eventId = (int)appointment.RecurrenceParentID; occurrenceDate = appointment.Start; } var @event = Event.Load(eventId); this.ToolTipEventId = eventId; this.ToolTipEventOccurrenceDate = occurrenceDate; this.ShowToolTip(@event, occurrenceDate, e.UpdatePanel); }
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) { this.UpdateToolTip(int.Parse(args.Value), args.UpdatePanel); }