משיב מוביל
שימוש בלוח שנה עברי / לועזי

שאלה
-
תשובות
-
שלום. אני מפנה אותך לכמה מקורות בנושא
הראשי:
וכן נסה לדלות מכאן:
http://soberingup.brinkster.net/elyasaf/hebdate.html
http://www.dr-vb.co.il/showcat.php?id=5
http://www.asp.org.il/article/hebrew-calendar
רעיון נוסף:
באפליקציה שפיתחתי, לקחתי את הפקד לוח השנה הרגיל של הויזואל, ורינדרתי לתוכו את התאריך העברי, אותו שלפתי מטבלה נפרדת. כמו כן בדרך זו, אתה יכול לרנדר לתוך תאי הימים את התאריך העברי כהיפר לינק ולהגדיר לו מה לעשות בזמן הקלקה. אם תרצה דוגמה של קוד, תגיד.
בהצלחה, ואם עזרתי, לחץ על 'סמן כתשובה', וסמן את התשובה כמועילה.- סומן כתשובה על-ידי maisels יום שלישי 19 אוקטובר 2010 09:36
-
-
מצ"ב הקוד הרלונטי:
Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender Dim i As Integer = 0 Dim flg As String = String.Empty Try ' '======================================== For Each dr3 As DataRow In ds.Tables(1).Rows If dr3(1) IsNot DBNull.Value And dr3(2) IsNot DBNull.Value Then Dim hdate As DateTime = dr3(1) Dim hebtitle As String = dr3(2).ToString If e.Day.Date = hdate Then Dim heblabel As New Label heblabel.Attributes.Add("runat", "server") heblabel.ID = "heblabel" heblabel.Text = " | " + hebtitle e.Cell.Controls.Add(heblabel) End If End If Next '===================================================== ' '============================== For Each dr1 As DataRow In ds.Tables(0).Rows Dim caldate As DateTime = dr1(1) Dim caltitle As String = dr1(2).ToString If e.Day.Date = caldate Then e.Cell.BackColor = Drawing.Color.Lavender e.Cell.Controls.Add(New LiteralControl("<div align=center style=" + "height:5px;" + ">")) Dim lable As New Label lable.Attributes.Add("runat", "server") lable.ID = "sdates" lable.Text = caltitle e.Cell.Controls.Add(lable) e.Cell.Controls.Add(New LiteralControl("</div> <hr/>")) End If Next '====================================== End Try End Sub
בהצלחה, ואם עזרתי, לחץ על 'סמן כתשובה', וסמן את התשובה כמועילה.- סומן כתשובה על-ידי maisels יום שלישי 19 אוקטובר 2010 09:36
כל התגובות
-
שלום. אני מפנה אותך לכמה מקורות בנושא
הראשי:
וכן נסה לדלות מכאן:
http://soberingup.brinkster.net/elyasaf/hebdate.html
http://www.dr-vb.co.il/showcat.php?id=5
http://www.asp.org.il/article/hebrew-calendar
רעיון נוסף:
באפליקציה שפיתחתי, לקחתי את הפקד לוח השנה הרגיל של הויזואל, ורינדרתי לתוכו את התאריך העברי, אותו שלפתי מטבלה נפרדת. כמו כן בדרך זו, אתה יכול לרנדר לתוך תאי הימים את התאריך העברי כהיפר לינק ולהגדיר לו מה לעשות בזמן הקלקה. אם תרצה דוגמה של קוד, תגיד.
בהצלחה, ואם עזרתי, לחץ על 'סמן כתשובה', וסמן את התשובה כמועילה.- סומן כתשובה על-ידי maisels יום שלישי 19 אוקטובר 2010 09:36
-
-
-
מצ"ב הקוד הרלונטי:
Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender Dim i As Integer = 0 Dim flg As String = String.Empty Try ' '======================================== For Each dr3 As DataRow In ds.Tables(1).Rows If dr3(1) IsNot DBNull.Value And dr3(2) IsNot DBNull.Value Then Dim hdate As DateTime = dr3(1) Dim hebtitle As String = dr3(2).ToString If e.Day.Date = hdate Then Dim heblabel As New Label heblabel.Attributes.Add("runat", "server") heblabel.ID = "heblabel" heblabel.Text = " | " + hebtitle e.Cell.Controls.Add(heblabel) End If End If Next '===================================================== ' '============================== For Each dr1 As DataRow In ds.Tables(0).Rows Dim caldate As DateTime = dr1(1) Dim caltitle As String = dr1(2).ToString If e.Day.Date = caldate Then e.Cell.BackColor = Drawing.Color.Lavender e.Cell.Controls.Add(New LiteralControl("<div align=center style=" + "height:5px;" + ">")) Dim lable As New Label lable.Attributes.Add("runat", "server") lable.ID = "sdates" lable.Text = caltitle e.Cell.Controls.Add(lable) e.Cell.Controls.Add(New LiteralControl("</div> <hr/>")) End If Next '====================================== End Try End Sub
בהצלחה, ואם עזרתי, לחץ על 'סמן כתשובה', וסמן את התשובה כמועילה.- סומן כתשובה על-ידי maisels יום שלישי 19 אוקטובר 2010 09:36
-
אני רואה שההערות הסבר בעברית שצורפו לקוד הושמטו.
החלק הראשון של הקוד (שתחום בקווים=============) הוא טעינה ממסד הנתונים של התאריך העברי ורינדור שלו כ Label בתוך הלוח שנה (לא צרפתי את הקוד ASP.NET של הלוח עצמו. תעצב אותו כרצונך. אני מתחתי והגדלתי אותו על מסך שלם כך שכל יום יצא ריבוע יחסית גדול (רינדרתי לתוך כל תא עוד הרבה מידע)). החלק השני הוא טעינה ורינדור של תאריכי חגים ושאר תאריכים מיוחדים שהמשתמש מזין.בממשק מיוחד למסד הנתונים.
בהצלחה, ואם עזרתי, לחץ על 'סמן כתשובה', וסמן את התשובה כמועילה.