Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Graph schedule for hotel menagment system

Graph schedule for hotel menagment system

Scheduled Pinned Locked Moved C#
tutorialcsharpdatabasemysqldata-structures
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nighttrain_
    wrote on last edited by
    #1

    Hi there ! I start to developing a hotel managment system C# + MySQL database. I have to make some like graph schedule (it's only for view) It should looks like: for example on some month... is 3 persons in room2 from 2 to sixth day of month and the color of this line...

      1 2 3 4 5 6 7.... 31 (days for months)
    

    room1
    room2 3 3 3 3 3
    room3

    it will download the data_from and data_to of reservation some of specified room, the type of residence which is declarated in specified color and then at last how many persons are in this room and now it will draw lines of a given color from the day-to-date and in the middle of this line in each row of the color line the number of people in this room I wonder how to do it ... First what control should i use dg, lvor ..? And how to declare this all months with days... Plz help how to start it?

    R 1 Reply Last reply
    0
    • N nighttrain_

      Hi there ! I start to developing a hotel managment system C# + MySQL database. I have to make some like graph schedule (it's only for view) It should looks like: for example on some month... is 3 persons in room2 from 2 to sixth day of month and the color of this line...

        1 2 3 4 5 6 7.... 31 (days for months)
      

      room1
      room2 3 3 3 3 3
      room3

      it will download the data_from and data_to of reservation some of specified room, the type of residence which is declarated in specified color and then at last how many persons are in this room and now it will draw lines of a given color from the day-to-date and in the middle of this line in each row of the color line the number of people in this room I wonder how to do it ... First what control should i use dg, lvor ..? And how to declare this all months with days... Plz help how to start it?

      R Offline
      R Offline
      RobCroll
      wrote on last edited by
      #2

      I'd use a DataGrid and to keep it simple stupid have a class that represents the room and every day of the month. Then write some code which returns a collection of the class. There would be a lot smarter ways to approach this but sometimes keeping it simple is the most maintainable. You may also look at your database structure because sometime guests may stay in one room for 2 nights and a luxury room for 1 night. You may want to store this data night by night and not from-to date. Good luck with it. Micros Fidelio are one of the most fierce competitors your every likely to bump into.

      Architecture is extensible, code is minimal.

      N 1 Reply Last reply
      0
      • R RobCroll

        I'd use a DataGrid and to keep it simple stupid have a class that represents the room and every day of the month. Then write some code which returns a collection of the class. There would be a lot smarter ways to approach this but sometimes keeping it simple is the most maintainable. You may also look at your database structure because sometime guests may stay in one room for 2 nights and a luxury room for 1 night. You may want to store this data night by night and not from-to date. Good luck with it. Micros Fidelio are one of the most fierce competitors your every likely to bump into.

        Architecture is extensible, code is minimal.

        N Offline
        N Offline
        nighttrain_
        wrote on last edited by
        #3

        i will have a data_from, data_to in, number_of_people register table the colors will declare in other one i think and the room in other and buildings in other :/ In C# i will have .cs files which represents entities and mapping classes for this entities . But could u write some example how it could be? I Will really happy ;) I heard somewhere that lv will be better than dg... BTW if I will use Flunet NHibernate and LINQ NH + mapping should I make in My MySQL Server relations on Entities (i mean in MySQL Server) or just make entities and PK's but in VS Entities .cs files and mapping it will be enough ?: for example:

        public class ClientMap : ClassMap<Client>
        {
        public ClientMap()
        {
        Id(x => x.Id).Column("client_id");
        Map(x => x.FirstName).Column("imie");
        Map(x => x.LastName).Column("nazwisko");
        Map(x => x.Created).Column("utworzony").Not.Nullable();
        Map(x => x.Updated).Column("aktualizacja");
        Map(x => x.Deleted).Column("Usuniety");

                HasMany(x => x.Rooms)
                    .Access.Property()
                    .Cascade.All()
                    .LazyLoad()
                    .KeyColumn("client\_id");
        
                Table("klient");
            }}
        

        modified on Tuesday, February 1, 2011 6:45 PM

        R 1 Reply Last reply
        0
        • N nighttrain_

          i will have a data_from, data_to in, number_of_people register table the colors will declare in other one i think and the room in other and buildings in other :/ In C# i will have .cs files which represents entities and mapping classes for this entities . But could u write some example how it could be? I Will really happy ;) I heard somewhere that lv will be better than dg... BTW if I will use Flunet NHibernate and LINQ NH + mapping should I make in My MySQL Server relations on Entities (i mean in MySQL Server) or just make entities and PK's but in VS Entities .cs files and mapping it will be enough ?: for example:

          public class ClientMap : ClassMap<Client>
          {
          public ClientMap()
          {
          Id(x => x.Id).Column("client_id");
          Map(x => x.FirstName).Column("imie");
          Map(x => x.LastName).Column("nazwisko");
          Map(x => x.Created).Column("utworzony").Not.Nullable();
          Map(x => x.Updated).Column("aktualizacja");
          Map(x => x.Deleted).Column("Usuniety");

                  HasMany(x => x.Rooms)
                      .Access.Property()
                      .Cascade.All()
                      .LazyLoad()
                      .KeyColumn("client\_id");
          
                  Table("klient");
              }}
          

          modified on Tuesday, February 1, 2011 6:45 PM

          R Offline
          R Offline
          RobCroll
          wrote on last edited by
          #4

          I don't have any examples at hand but there are a few open source PMS systems out there so do a search and see how they have approached the problem. It's a fundamental requirement for both PMS and CRS systems. Regards Rob

          Architecture is extensible, code is minimal.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups