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

Поделиться
HTML-код
  • Опубликовано: 24 окт 2021
  • 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 Год назад +1

    Hi Joe! Thank you for this video !!

  • @LetsTimZR
    @LetsTimZR 2 года назад +4

    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 18 дней назад

    Nice master, cant wait to save multiple days like " booking days " waiting for update master.

  • @isaiasfranciscodasilva644
    @isaiasfranciscodasilva644 Год назад

    Great video, it helped me a lot.
    Thanks.

  • @eng.hasaneldor6001
    @eng.hasaneldor6001 11 месяцев назад

    wonderful,i have a question can i display all events while I load the calendar or months

  • @storeload
    @storeload 2 месяца назад

    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 10 месяцев назад

    @coding_ideas I need help the event wont show on the calendar after pressing the button. I even checked the timer

  •  Год назад

    good job

  • @SENSEIKRT
    @SENSEIKRT 2 года назад

    can you do a calendar that display events without using SQL server? Thanks

  • @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

  • @user-wr4ez7iv7q
    @user-wr4ez7iv7q 2 года назад

    Hi! When I run the program I have a large number of EventForms open

  • @narbae2522
    @narbae2522 6 месяцев назад +1

    Why is the event are duplicating after i click to another usercontrol

  • @lsmendola9323
    @lsmendola9323 11 месяцев назад

    hello , my timer is doent s uptade after i add event and he s dont show in calenday, any sugestion?

  • @playtoy_cardi_7201
    @playtoy_cardi_7201 Год назад

    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  Год назад +1

      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

  • @ALANANTONIOJIMENEZSALAZAR
    @ALANANTONIOJIMENEZSALAZAR 2 месяца назад

    is this possible without the database?

  • @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 .

  • @lomoabr1969
    @lomoabr1969 6 дней назад

    pls can you give me a link to the github project

  • @zulkarneyneryilmaz1600
    @zulkarneyneryilmaz1600 6 месяцев назад

    Hello, I am having a problem with SQL Server. It does not accept question marks.

  • @misbxh
    @misbxh 4 месяца назад

    how do i do this if i dont have sql please help asap

  • @shainamae2857
    @shainamae2857 2 года назад

    THANK YOU PO

  • @arsenic8123
    @arsenic8123 2 года назад +3

    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 Год назад

      same here did u find a solution ?

    • @felixandro1512
      @felixandro1512 Год назад

      same. Any tips?

    • @arsenic8123
      @arsenic8123 Год назад

      @@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?

  • @raouffofe
    @raouffofe Год назад +1

    شكرا جزيلا صديقي عمل رائع

  • @nicolahoward8712
    @nicolahoward8712 2 года назад +3

    Because I am using SQL Server I had to change the '?' to @Date. Worked fine after that : )

    • @TheGame1083
      @TheGame1083 Год назад +1

      Yes same here, I had to utilize @Date and @ Event as I also used SQL Server

    • @JeremyTelmoro
      @JeremyTelmoro 6 месяцев назад

      how to change this code into sql server?@@TheGame1083

    • @JeremyTelmoro
      @JeremyTelmoro 6 месяцев назад

      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 Месяц назад

      Hello .. did it work when you add event did he show in the calander or no please ?

  • @JeremyTelmoro
    @JeremyTelmoro 6 месяцев назад

    How to convert it into a sql command?

  • @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 Год назад

      i have the same problem. Do you know how to fix it?

  • @Richmond1226
    @Richmond1226 2 года назад

    lods hindi lumalabas ung nilagay ko sa event sa calendar

  • @ramezamin9764
    @ramezamin9764 11 месяцев назад

    Helllo, i want to add event with start date and finish date

  • @quochung27092k
    @quochung27092k Год назад

    Can you share the source code?

  • @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?

  • @wait...5091
    @wait...5091 5 месяцев назад

    please help, it does not display the name of the event on the calendar, although it is in the database

    • @wait...5091
      @wait...5091 5 месяцев назад

      And also why you need a timer to open display event?

  • @HanifiNarmot
    @HanifiNarmot 2 года назад +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.

  • @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 6 месяцев назад

    Help me pleaseeee 🥹