protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { //Response.Write("Month Changed"); String NewMonth = GetMonthName(e.NewDate.Month); String OldMonth = GetMonthName(e.PreviousDate.Month); Response.Write("Month changed from "+OldMonth +" to "+NewMonth); }
public void Ctor () { DateTime now = DateTime.MaxValue; DateTime later = DateTime.MinValue; MonthChangedEventArgs e = new MonthChangedEventArgs (now, later); Assert.AreEqual (e.NewDate, now, "A1"); Assert.AreEqual (e.PreviousDate, later, "A2"); }
private void Calendar1_VisibleMonthChanged(object sender, System.Web.UI.WebControls.MonthChangedEventArgs e) { // PopupDiv.Style.Add("display" ,"block"); // string offsetWidth=PopupDiv.Style["offsetWidth"]; // DivShim.Style.Add("width",offsetWidth); // string offsetHeight=PopupDiv.Style["offsetHeight"]; // DivShim.Style.Add("height",offsetHeight); // string top=PopupDiv.Style["top"]; // DivShim.Style.Add("top",top); // string left=PopupDiv.Style["left"]; // DivShim.Style.Add("left" ,left); // int zIndex=Convert.ToInt32(PopupDiv.Style["zIndex"])-1; // DivShim.Style.Add("zIndex" ,zIndex.ToString()); // DivShim.Style.Add("display" ,"block"); this.Page.RegisterStartupScript("showcalendario", "ShowCalendar2(true);"); }
protected void Calendar2_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { ScriptManager.RegisterStartupScript(UpdatePanel2, UpdatePanel2.GetType(), "key", "document.getElementById('Calendardiv2').style.display=\"block\";", true); }
protected void calendar_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { ((Calendar)sender).Style.Add("display", ""); }
protected void calEvents_MonthChanged(object sender, MonthChangedEventArgs e) { LoadEventsData(e.NewDate); }
/// <summary> /// Method performs logic when visible month is changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void _calendar_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { if (!_error) { try { FetchEvents(); } catch (Exception ex) { HandleException(ex); } } }
protected void ctlCalendar_VisibleMonthChanged(Object sender, MonthChangedEventArgs e) { if ( dtCurrentDate.Day <= e.NewDate.AddMonths(1).AddDays(-1).Day ) dtCurrentDate = new DateTime(e.NewDate.Year, e.NewDate.Month, dtCurrentDate.Day); else dtCurrentDate = e.NewDate.AddMonths(1).AddDays(-1); // 09/30/2005 Must rebind. BindGrid(); }
private void VisibleMonthChangedHandler (object sender, MonthChangedEventArgs e) { eventFired = true; }
private void calendarMonth_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { //If we post back because of a Next or Prev month operation, rediect to that month. // TODO: It'd be cleaner to override the Next/Prev button rendering and make the link direct // and avoid this silly postback. Response.Redirect(GetUrlWithMonth(calendarMonth.VisibleDate.Date)); }
void dataCal1_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { BindCalendar(); }
protected void VisibleMonthChanged(object sender, MonthChangedEventArgs eventArgs) { dates = calendarManager.findDatesByMonth(eventArgs.NewDate.Year, eventArgs.NewDate.Month); }
protected void calEvents_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { dtCalEvents = CalendarEventsBiz.GetCalendarEvents(e.NewDate.ToString()); }
private void Calendar1_VisibleMonthChanged(object sender, System.Web.UI.WebControls.MonthChangedEventArgs e) { SqlConnection cn = new SqlConnection("Persist Security Info=False;Pwd=ocarpts@2;User ID=ocarpts;Initial Catalog=SnapShot;Data Source=TimRagain06"); SqlCommand cm = new SqlCommand(); SqlDataReader dr; DateTime dDate = DateTime.Now; int rowCtr = 0; int cellCtr = 0; int cellCnt = 5; int iLang = 0; string sLang; TableRow tRow; TableCell tCell; cn.Open(); cm.CommandType = CommandType.StoredProcedure; cm.CommandTimeout = 240; cm.CommandText = "GetOSLangReport"; cm.Parameters.Add("@sDate", System.Data.SqlDbType.VarChar, 12); dDate = Calendar1.SelectedDate; cm.Parameters[0].Value = dDate.ToShortDateString(); cm.Connection = cn; dr = cm.ExecuteReader(); //dr.Read(); do { if (rowCtr > 0) { sLang = dr.GetString(0); if (sLang == "") { iLang = 0; } else { iLang = System.Convert.ToInt16(dr.GetString(0), 10); } } if (rowCtr == 0 || ddlLangs.SelectedItem.Value == "ALL" || iLang.ToString() == ddlLangs.SelectedItem.Value) { tRow = new TableRow(); // } for (cellCtr = 1; cellCtr <= cellCnt; cellCtr++) { tblUploads.Rows.Add(tRow); tCell = new TableCell(); if (rowCtr == 0) { switch (cellCtr) { case 1: tCell.Text = "OS Lang2"; break; case 2: tCell.Text = "Total"; break; case 3: tCell.Text = "OS Version"; break; case 4: tCell.Text = "OS Name"; break; case 5: tCell.Text = "Date"; break; default: tCell.Text = ""; break; } tCell.Style["font-size"] = "small"; tCell.Height = 20; } else { switch (cellCtr) { case 1: // tCell.Text = dr.GetString(0).ToString(); try { tCell.Text = dr.GetString(0); } catch { tCell.Text = "Unknown" + dr.GetString(0); } break; case 2: tCell.Text = dr.GetInt32(1).ToString(); break; case 3: tCell.Text = dr.GetString(2).ToString(); break; case 4: tCell.Text = dr.GetString(3).ToString(); break; case 5: if (dr.IsDBNull(4)) { tCell.Text = ""; } else { tCell.Text = dr.GetDateTime(4).ToShortDateString(); } break; default: tCell.Text = "0"; break; } tCell.Style["background-color"] = "white"; tCell.Style["font-size"] = "small-x"; tCell.Style["color"] = "#6487dc"; tCell.Style["font-weight"] = "Bold"; tCell.Height = 20; } tCell.Style["font-family"] = "Tahoma"; tRow.Cells.Add(tCell); } //for } rowCtr++; }while(dr.Read() == true); }
protected void Cal_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { bl.Items.Clear(); }
void onVisibleMonthChanged(DateTime oldDate, DateTime newDate) { MonthChangedEventArgs args = new MonthChangedEventArgs(oldDate, newDate); if (VisibleMonthChanged != null) VisibleMonthChanged(this, args); DataBind(); }
protected void calendar_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { }
private void Cal1VisibleMonthChanged(object sender, MonthChangedEventArgs e) { if (!this.RenderInWebPartMode) { //string baseUrl = currentPage.ResolveUrl(siteSettings); string baseUrl = SiteUtils.GetCurrentPageUrl(); //if (baseUrl.EndsWith(".aspx")) //{ baseUrl += "?"; //} //else //{ // baseUrl += "&"; //} string redirectUrl = baseUrl + visibleDateParam + "=" + Page.Server.UrlEncode(e.NewDate.ToString("s")); WebUtils.SetupRedirect(this, redirectUrl); } }
private void Calendar1_VisibleMonthChanged(object sender, System.Web.UI.WebControls.MonthChangedEventArgs e) { SqlConnection cn = new SqlConnection("Persist Security Info=False;Pwd=ocarpts@2;User ID=ocarpts;Initial Catalog=SnapShot;Data Source=TimRagain06"); SqlCommand cm = new SqlCommand(); SqlDataReader dr; DateTime dDate = DateTime.Now; int rowCtr = 0; int cellCtr = 0; int cellCnt = 2; cn.Open(); cm.CommandType = CommandType.StoredProcedure; cm.CommandTimeout = 240; cm.CommandText = "WeeklyCountsByDates"; cm.Parameters.Add("@sDate", System.Data.SqlDbType.VarChar, 12); dDate = Calendar1.SelectedDate; cm.Parameters[0].Value = dDate.ToShortDateString(); cm.Connection = cn; dr = cm.ExecuteReader(); //dr.Read(); do { TableRow tRow = new TableRow(); tblUploads.Rows.Add(tRow); for (cellCtr = 1; cellCtr <= cellCnt; cellCtr++) { TableCell tCell = new TableCell(); if (rowCtr == 0) { switch (cellCtr) { case 1: tCell.Text = "Total"; break; case 2: tCell.Text = "Date"; break; default: tCell.Text = ""; break; } tCell.Style["font-size"] = "small"; tCell.Height = 20; } else { switch (cellCtr) { case 1: tCell.Text = dr.GetInt32(0).ToString(); break; case 2: if (dr.IsDBNull(0)) { tCell.Text = ""; } else { tCell.Text = dr.GetDateTime(1).ToShortDateString(); } break; default: tCell.Text = "0"; break; } tCell.Style["background-color"] = "white"; tCell.Style["font-size"] = "small-x"; tCell.Style["color"] = "#6487dc"; tCell.Style["font-weight"] = "Bold"; tCell.Height = 20; } tCell.Style["font-family"] = "Tahoma"; tRow.Cells.Add(tCell); } rowCtr++; }while(dr.Read() == true); }
protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { _dEasterDate = GetEasterDate(Calendar1.VisibleDate.Year); }
protected void navCalendar_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { navCalendar.SelectedDate = navCalendar.VisibleDate; CurrentDate = navCalendar.SelectedDate; }
private void CalBlogNavVisibleMonthChanged(object sender, MonthChangedEventArgs e) { CalendarDate = e.NewDate.ToLastDateOfMonth(); RedirectFromCalendar(); }
protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { getDetectiveCalendarDetails(e.NewDate); }
/// <summary> /// Handles the VisibleMonthChanged event of the calEventCalendar control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="MonthChangedEventArgs"/> instance containing the event data.</param> protected void calEventCalendar_VisibleMonthChanged( object sender, MonthChangedEventArgs e ) { SelectedDate = e.NewDate; ResetCalendarSelection(); BindData(); }
void MonthChange(Object sender, MonthChangedEventArgs e) { if (e.NewDate.Month > e.PreviousDate.Month) { // Message.Text = "You moved forward one month."; } else { // Message.Text = "You moved backwards one month."; } }
void Calendar_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { this.Calendar.DataBind(); }
void VacacionesCalendar_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { RefreshCalendar(); }
/*Método para que la página no se actualice cada vez que el usuario elige un nuevo mes */ protected void cambioDeMes(object sender, MonthChangedEventArgs e) { UpdatePanelCalendario.Update(); }
/// <summary> /// Handles the month change event on the calendar control keeping the <DIV> tage used to create the pop up visible /// </summary> /// <param></param> /// <returns></returns> protected void calDate_VisibleMonthChanged2(object sender, System.Web.UI.WebControls.MonthChangedEventArgs e) { dateField2.Style.Value = "display:block;"; }
protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { FillHolidayDataset(); }
void _calendar_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { if (TraDate) { ScriptManager.RegisterStartupScript(this._updatePanel, this.GetType(), "datescript", string.Format("setTraDate('{0}')", this._calendar.ClientID), true); } }
protected void cdrCurrentDate_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { cdrCurrentDate.VisibleDate = e.NewDate; FillDatesUsingData(e.NewDate); }
/// <summary> /// Occurs when the user clicks on the next or previous month navigation controls on the title heading. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void entryCal_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { //string url = CurrentBlog.UrlFormats.MonthUrl(e.NewDate); //Server.Transfer(url); }
private void Calendar1_VisibleMonthChanged(object sender, System.Web.UI.WebControls.MonthChangedEventArgs e) { SetMonthYear(e.NewDate.Month, e.NewDate.Year); }
protected void DateTimePicker_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { CalendarRelatedDate = e.NewDate; }