Part 3 | How to Create a Calendar | Display Events | C# | Windows Form

  Рет қаралды 24,494

Coding Ideas

Coding Ideas

2 жыл бұрын

Thanks for watching. If you liked this video, make sure to subscribe for more
PART 1
• PART 1 | How To Create...
PART 2
• Part 2 | How to Create...

Пікірлер: 61
@cj-nu6ht
@cj-nu6ht 2 жыл бұрын
I just had to thank you for the videos. They helped out a lot keep up the good tutorials.
@hansgonzalez8686
@hansgonzalez8686 Жыл бұрын
Hi Joe! Thank you for this video !!
@isaiasfranciscodasilva644
@isaiasfranciscodasilva644 Жыл бұрын
Great video, it helped me a lot. Thanks.
@LetsTimZR
@LetsTimZR 2 жыл бұрын
How can i add more than one event to a specific date? For Instance your video "Calendar Event Scheuduler". Do you have the code anywhere published ?
@rasbry225
@rasbry225 Ай бұрын
Nice master, cant wait to save multiple days like " booking days " waiting for update master.
Жыл бұрын
good job
@eng.hasaneldor6001
@eng.hasaneldor6001 Жыл бұрын
wonderful,i have a question can i display all events while I load the calendar or months
@storeload
@storeload 3 ай бұрын
Really great video series thank you. Is there no other way of auto updating the calendar view rather than polling the database? it seems like a waste of resources. In this case it isn't too bad, but I have built similar apps using a client to view the data and update. The only way I could do this was using regular polling to update. I did get it working with Service Broker using MSSQL the once, but this proved to be very complicated and not really worth the hassle.
@CarlosRomero-qy3du
@CarlosRomero-qy3du 11 ай бұрын
@coding_ideas I need help the event wont show on the calendar after pressing the button. I even checked the timer
@ebrahimabd-elrazik24
@ebrahimabd-elrazik24 Жыл бұрын
I just wanted to know how to make a mark on today so the user know that we are in November 1st something like that
@SENSEIKRT
@SENSEIKRT 2 жыл бұрын
can you do a calendar that display events without using SQL server? Thanks
@narbae2522
@narbae2522 8 ай бұрын
Why is the event are duplicating after i click to another usercontrol
@user-wr4ez7iv7q
@user-wr4ez7iv7q 2 жыл бұрын
Hi! When I run the program I have a large number of EventForms open
@raouffofe
@raouffofe Жыл бұрын
شكرا جزيلا صديقي عمل رائع
@coding_ideas
@coding_ideas Жыл бұрын
you're welcome :) .
@playtoy_cardi_7201
@playtoy_cardi_7201 2 жыл бұрын
Is it possible that you made a video with a data base? In the data base, you'll have the month day etc, that when inserted either in the data base or the actual winform, the events would show up
@coding_ideas
@coding_ideas 2 жыл бұрын
hello, thanks for the suggestion. when i made this video I assume that viewers already know how to make a database :) . i will include database creation next time :) . thank you
@nicolahoward8712
@nicolahoward8712 2 жыл бұрын
Hi Jeov. I have a problem with the syntax of the select statement. I get an error that says incorrect syntax near the "?". I even put the query through the query builder but cannot find the problem. I hope you can shed some light on it for me. Regards from the UK
@coding_ideas
@coding_ideas 2 жыл бұрын
Hi Nicola, It seems like there is sth wrong with ur query statemnt. Check your query statement if its correct. Double check if the syntax is correct or if there are no mispelled words .
@nicolahoward8712
@nicolahoward8712 2 жыл бұрын
Because I am using SQL Server I had to change the '?' to @Date. Worked fine after that : )
@TheGame1083
@TheGame1083 2 жыл бұрын
Yes same here, I had to utilize @Date and @ Event as I also used SQL Server
@JeremyTelmoro
@JeremyTelmoro 7 ай бұрын
how to change this code into sql server?@@TheGame1083
@JeremyTelmoro
@JeremyTelmoro 7 ай бұрын
this is my code guys using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HealthCare_Dashboard { public partial class UserControlDays : UserControl { public static string static_day; public UserControlDays() { InitializeComponent(); } SqlConnection Con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Armando\OneDrive\Documents\event.mdf;Integrated Security=True;Connect Timeout=30"); private void UserControlDays_Load(object sender, EventArgs e) { } public void days(int numday) { ibdays.Text = numday.ToString(); } private void UserControlDays_Click(object sender, EventArgs e) { static_day = ibdays.Text; timer1.Start(); Form5 eventform = new Form5(); eventform.Show(); } // create a new method to display event private void displayEvent() { { Con.Open(); string sql = "SELECT * FROM [Table] WHERE Date = @date"; using (SqlCommand cmd = new SqlCommand(sql, Con)) { cmd.Parameters.AddWithValue("@date", Form4.static_year + "_" + Form4.static_month + "_" + ibdays.Text); using (SqlDataReader reader = cmd.ExecuteReader()) { if (reader.Read()) { lbevent.Text = reader["Event"].ToString(); } } } Con.Close(); } } //create a timer for auto display event if new event is added private void timer1_Tick(object sender, EventArgs e) { //call the displayEvent method displayEvent(); } } }
@mahmoudhmila4915
@mahmoudhmila4915 2 ай бұрын
Hello .. did it work when you add event did he show in the calander or no please ?
@lsmendola9323
@lsmendola9323 Жыл бұрын
hello , my timer is doent s uptade after i add event and he s dont show in calenday, any sugestion?
@misbxh
@misbxh 6 ай бұрын
how do i do this if i dont have sql please help asap
@ALANANTONIOJIMENEZSALAZAR
@ALANANTONIOJIMENEZSALAZAR 3 ай бұрын
is this possible without the database?
@shainamae2857
@shainamae2857 2 жыл бұрын
THANK YOU PO
@coding_ideas
@coding_ideas 2 жыл бұрын
You're Welcome :)
@arsenic8123
@arsenic8123 2 жыл бұрын
Hello, nice tutorial and thank you for the video. I have an issue about displaying the text in event calendar. I didn't got an error but the text does not appear after I add an event . I use SqlServer (System.Data.SqlClient) and I used @Date instead "?" in SQL query. Can you help me with this problem? Thank you in advance.
@abdelrhmanahmed5131
@abdelrhmanahmed5131 2 жыл бұрын
same here did u find a solution ?
@felixandro1512
@felixandro1512 2 жыл бұрын
same. Any tips?
@arsenic8123
@arsenic8123 2 жыл бұрын
@@abdelrhmanahmed5131 Hello, I found this solution: private void displayEvent() { SqlConnection con = new SqlConnection(connectionString); con.Open(); string sql = "SELECT * FROM Event WHERE date= @date"; SqlCommand cmd = con.CreateCommand(); cmd.CommandText = sql; cmd.Parameters.AddWithValue("date", FormAdmin.static_year + "-" + FormAdmin.static_month + "-" + lblDays.Text + lbltime.Text); SqlDataReader reader = cmd.ExecuteReader(); if (reader.Read()) { lbevent.Text = reader["Event"].ToString(); lbltime.Text = reader["Time"].ToString(); } reader.Dispose(); cmd.Dispose(); con.Close(); } This worked for me.
@matias-5050
@matias-5050 Жыл бұрын
solution?
@javierchinchilla9981
@javierchinchilla9981 Жыл бұрын
Did you guys find a solution?
@JeremyTelmoro
@JeremyTelmoro 7 ай бұрын
How to convert it into a sql command?
@zulkarneyneryilmaz1600
@zulkarneyneryilmaz1600 7 ай бұрын
Hello, I am having a problem with SQL Server. It does not accept question marks.
@lomoabr1969
@lomoabr1969 Ай бұрын
pls can you give me a link to the github project
@Richmond1226
@Richmond1226 2 жыл бұрын
lods hindi lumalabas ung nilagay ko sa event sa calendar
@quochung27092k
@quochung27092k Жыл бұрын
Can you share the source code?
@fiza758
@fiza758 2 жыл бұрын
When i type in a new event on a different date, the previous usercontrolday boxes i clicked on, populate with the exact same event that i just entered, do you know how to fix this?
@felixandro1512
@felixandro1512 2 жыл бұрын
i have the same problem. Do you know how to fix it?
@ramezamin9764
@ramezamin9764 Жыл бұрын
Helllo, i want to add event with start date and finish date
@bilecxyscambero8551
@bilecxyscambero8551 Жыл бұрын
Necesito la base de datos 😭
@niyazigokmen5612
@niyazigokmen5612 Жыл бұрын
bro for me it works it displays it but it displays all the events in my data how do i fix it so that it only shows the events on that day?
@eng.hasaneldor6001
@eng.hasaneldor6001 Жыл бұрын
sir please send code of display all events
@HanifiNarmot
@HanifiNarmot 2 жыл бұрын
how can i specify today's date
@coding_ideas
@coding_ideas Жыл бұрын
hello, Sorry for the delayed response. declare a static variable for your month and year in your main form, and assign a value. example : staticMonth = currentMonth; staticYear = currentYear; and in your UserControl Days. create current date variable example : currentDate = MainForm.staticMonth + "/" + lbday.text + "/" + MainForm.staticYear; and compare the currentDate and dateToday. if both are equal u can customize UserControl.
@wait...5091
@wait...5091 6 ай бұрын
please help, it does not display the name of the event on the calendar, although it is in the database
@wait...5091
@wait...5091 6 ай бұрын
And also why you need a timer to open display event?
@ebrahimabd-elrazik24
@ebrahimabd-elrazik24 Жыл бұрын
Hey!! you answered everyone except me and one or two people please help
@coding_ideas
@coding_ideas Жыл бұрын
hello, Sorry for the delayed response. declare a static variable for your month and year in your main form, and assign a value. example : staticMonth = currentMonth; staticYear = currentYear; and in your UserControl Days. create current date variable example : currentDate = MainForm.staticMonth + "/" + lbday.text + "/" + MainForm.staticYear; and compare the currentDate and dateToday. if both are equal u can customize UserControl.
@matias-5050
@matias-5050 Жыл бұрын
Hi, the event doesn´t appear after i click the button add event
@coding_ideas
@coding_ideas Жыл бұрын
Check your timer :).
@matias-5050
@matias-5050 Жыл бұрын
@@coding_ideas Ty brother ! , how can i update the year if i click next in december?
@coding_ideas
@coding_ideas Жыл бұрын
@@matias-5050 increment the year :). If its greater than 12 which is the month of december, add 1 to ur year .
@matias-5050
@matias-5050 Жыл бұрын
@@coding_ideasyou mean : year ++; ?
@matias-5050
@matias-5050 Жыл бұрын
@@coding_ideas It give me a exception : " The year, month, and day parameters describe a DateTime field that cannot be rendered.' "
@JeremyTelmoro
@JeremyTelmoro 7 ай бұрын
Help me pleaseeee 🥹
Part 2 | How to Create a Calendar | Add Events | C# Windows Form
12:35
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 2,5 МЛН
Create a Dynamic Calendar in C# Windows Form
7:14
Coding Ideas
Рет қаралды 3,3 М.
How to Create a Modern Sliding Sidebar | C# Winform
17:32
Coding Ideas
Рет қаралды 177 М.
C# - Scrolling a Flow layout Panel using Buttons in WinForm App
5:04
C# Ui Academy
Рет қаралды 100 М.
Tutorial : How to Create a Toast Message. C# | Windows Form
12:42
C# Tutorial - Circular Button & Circular PictureBox | FoxLearn
10:52
How To Create Auto Update -  C# | Windows Form
23:34
Coding Ideas
Рет қаралды 21 М.
календарь Winforms
16:04
Yura Ivanov
Рет қаралды 50
How To Create Stopwatch Using C# - Visual Studio Tutorials
10:53
Dear Programmer
Рет қаралды 17 М.
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 4,4 МЛН
APPLE совершила РЕВОЛЮЦИЮ!
0:39
ÉЖИ АКСЁНОВ
Рет қаралды 4,3 МЛН
Ждёшь обновление IOS 18? #ios #ios18 #айоэс #apple #iphone #айфон
0:57
Samsung S24 Ultra professional shooting kit #shorts
0:12
Photographer Army
Рет қаралды 34 МЛН