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);
 }
示例#2
0
		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");
		}
示例#3
0
        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", "");
 }
示例#6
0
 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);
         }
     }
 }
示例#8
0
		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;
		}
示例#10
0
		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();
 }
示例#12
0
 protected void VisibleMonthChanged(object sender, MonthChangedEventArgs eventArgs)
 {
     dates = calendarManager.findDatesByMonth(eventArgs.NewDate.Year, eventArgs.NewDate.Month);
 }
示例#13
0
 protected void calEvents_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
 {
     dtCalEvents = CalendarEventsBiz.GetCalendarEvents(e.NewDate.ToString());
 }
示例#14
0
        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);
        }
示例#15
0
 protected void Cal_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
 {
     bl.Items.Clear();
 }
示例#16
0
 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);
        }
示例#20
0
 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;
        }
示例#22
0
 private void CalBlogNavVisibleMonthChanged(object sender, MonthChangedEventArgs e)
 {
     CalendarDate = e.NewDate.ToLastDateOfMonth();
     RedirectFromCalendar();
 }
 protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
 {
     getDetectiveCalendarDetails(e.NewDate);
 }
示例#24
0
 /// <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();
 }
示例#29
0
 /// <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;";
 }
示例#30
0
 protected void Calendar1_VisibleMonthChanged(object sender,
     MonthChangedEventArgs e)
 {
     FillHolidayDataset();
 }
示例#31
0
 void _calendar_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
 {
     if (TraDate)
     {
         ScriptManager.RegisterStartupScript(this._updatePanel, this.GetType(), "datescript", string.Format("setTraDate('{0}')", this._calendar.ClientID), true);
     }
 }
示例#32
0
 protected void cdrCurrentDate_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
 {
     cdrCurrentDate.VisibleDate = e.NewDate;
     FillDatesUsingData(e.NewDate);
 }
示例#33
0
        /// <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);
        }
示例#34
0
 private void Calendar1_VisibleMonthChanged(object sender, System.Web.UI.WebControls.MonthChangedEventArgs e)
 {
     SetMonthYear(e.NewDate.Month, e.NewDate.Year);
 }
示例#35
0
 protected void DateTimePicker_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
 {
     CalendarRelatedDate = e.NewDate;
 }