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
N

nighttrain_

@nighttrain_
About
Posts
13
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C# Mysql query problem
    N nighttrain_

    anyone could answer plz

    C# database help csharp mysql tutorial

  • C# Mysql query problem
    N nighttrain_

    i tried to use a new two parameters:

    m_insert_cmd2.Parameters.Add("@DateStart", MySqlDbType.DateTime).Value = this.dateTimePicker1.Text;
    m_insert_cmd2.Parameters.Add("@DateEnd", MySqlDbType.DateTime).Value = this.dateTimePicker2.Text;

    and tried like this:

    m_insert_cmd2.Parameters.Add("@DateStart", MySqlDbType.DateTime).Value = this.dateTimePicker1.Text.ToString();
    m_insert_cmd2.Parameters.Add("@DateEnd", MySqlDbType.DateTime).Value = this.dateTimePicker2.Text.ToString();

    the same problem is communicat:

    String was not recognized as a valid DateTime.

    my full query look like:

    m_insert_cmd2 = new MySqlCommand("INSERT INTO tb_rezerwacja (kwota, ilosc_osob, w_tym_ilosc_dzieci, data_od, data_do, FK_pokoj_id, FK_zamowienie_id) VALUES (' 345', '3', '3', @DateStart, @DateEnd, @pokoj_id, @zamowienie_id)", m_conn);

    on form i add 2 dateTimepickers like u see and in MySQL database the date fields are in Date format...

    modified on Wednesday, July 20, 2011 3:00 PM

    C# database help csharp mysql tutorial

  • C# Mysql query problem
    N nighttrain_

    i start debug and open Output Window but it's strange what i saw:

    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'D:\_Programowanie\_Moje projekty\OKIENKOWE\HMS\HMS\hms\branches\hms.application\bin\Debug\hms.application.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'hms.application.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Modul

    C# database help csharp mysql tutorial

  • C# Mysql query problem
    N nighttrain_

    Mayby it's lame but how can I use this debug mode, i create a button and paste Yours:

    System.Diagnostics.Debug.WriteLine(tbPrice.Text);
    System.Diagnostics.Debug.WriteLine(tbNumberOfPeople.Text);
    System.Diagnostics.Debug.WriteLine(tbChildren.Text);
    System.Diagnostics.Debug.WriteLine(tbStartDate.Text);
    System.Diagnostics.Debug.WriteLine(tbEndDate.Text);

    mayby it's lame question but how should i do that?

    C# database help csharp mysql tutorial

  • C# Mysql query problem
    N nighttrain_

    i tried it and the same wrong result, still NULLS

    C# database help csharp mysql tutorial

  • C# Mysql query problem
    N nighttrain_

    Hi there good people ! I've got strange problem with query into C# code to MySQL database. The point is i got this query:

    m_insert_cmd2 = new MySqlCommand("INSERT INTO tb_rezerwacja (kwota, ilosc_osob, w_tym_ilosc_dzieci, data_od, data_do, FK_pokoj_id, FK_zamowienie_id) VALUES (, '" + tbPrice.Text + "', '" + tbNumberOfPeople.Text + "', '" + tbChildren.Text + "', '" + tbStartDate.Text + "', '" + tbEndDate.Text + "', @pokoj_id, @zamowienie_id)", m_conn);

    which is working but put all field in database to NULL without parameters : @pokoj_id and @rezerwacja_id - that's good. All tb.. are editboxes no matter what i write to them it always put nulls in database. I tried a lot of combinations with this query but i can;t do it working 100%. For example this query works fine (if i put static data) it's all put in database, no nulls:

    m_insert_cmd2 = new MySqlCommand("INSERT INTO tb_rezerwacja (kwota, ilosc_osob, w_tym_ilosc_dzieci, data_od, data_do, FK_pokoj_id, FK_zamowienie_id) VALUES (' 345', '3', '3', '0000-00-21', '0000-00-21', @pokoj_id, @zamowienie_id)", m_conn);

    What i do wrong, please help. best regards, nighttrain

    C# database help csharp mysql tutorial

  • Problem with panels
    N nighttrain_

    "hehe" :D thx again

    C# question help tutorial

  • Problem with panels
    N nighttrain_

    ok i rename it all and put thise code :

    private void toolStripSplitButton2_ButtonClick(object sender, EventArgs e)
    {
    SetVisible(panel1);
    }

        private void toolStripButton1\_Click(object sender, EventArgs e)
        {
            SetVisible(panel2);
        }
    
        private void toolStripButton2\_Click(object sender, EventArgs e)
        {
            SetVisible(panel3);
        }
    
    
        private void SetVisible(Panel p)
        {
            foreach (Control c in Controls)
            {
                Panel pan = c as Panel;
                if (pan != null)
                {
                    pan.Visible = false;
                }
            }
            p.Visible = true;
        }
    

    it's more beauty of code... than set all false/true without the intended purpose if the panels will... :) P.S It's really uncomfortable to switch between all panels "bring to front" :) thx for help !!

    C# question help tutorial

  • Problem with panels
    N nighttrain_

    Thanks for help i did a similar but i take 3 panels and set to dock: fill and I made sure that's not any one panel is child of the other panel... So i set all panels are on Form1. Then if i want to modify some panel i used Format -> Order -> Bring to front then i have access to a panel which i want to modify... I also type those 3 panels on

    visible = false

    and

        private void toolStripSplitButton2\_ButtonClick(object sender, EventArgs e)
        {
            panel2.Visible = false;
            panel3.Visible = false;
            panel1.Visible = true;
        }
    
        private void toolStripButton1\_Click(object sender, EventArgs e)
        {
            panel2.Visible = true;
            panel1.Visible = false;
            panel3.Visible = false;         
        }
    
        private void toolStripButton2\_Click(object sender, EventArgs e)
        {
            panel3.Visible = true;
            panel1.Visible = false;
            panel2.Visible = false;      
        }
    

    so it's that good in code? Or should i some change?

    C# question help tutorial

  • Problem with panels
    N nighttrain_

    Hi there all ! In my windows form application i add a tollstrip and 4 buttons on it. I also add 4 panels on form on Dock property: Fill. Mayby it's lame question but I want to modify some of this 4 panels and i go in properties and check for example Panel2 - the list of properties of this control is available but on form i still see a panel1, how i can see my panel2, or 3? I just want to add to this panels some buttons etc... best regards

    C# question help tutorial

  • Graph schedule for hotel menagment system
    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

    C# tutorial csharp database mysql data-structures

  • Graph schedule for hotel menagment system
    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?

    C# tutorial csharp database mysql data-structures

  • Hotel reservation system with C#
    N nighttrain_

    Hi there all ! I am starting to develop a hotel reservation system in MySQL + C# i am gonna to start first make a database structure, but i really need Your help with make this structure. The specification of the application is:

    -building/s
    -room/s
    -date from
    -date to
    -surname

      //this above 2 fields is like 1 field (count number of people) - but is 2 fields cause later need to know in some    table how many children was
      //SUM of this 2 fields is number of people which has put on graphic...
      -number of children             // should be 1 textbox but it nessecary later to count how many children was
      -number of older  
    
      -type of residence             //without spa and rehabilitation cause it will be above in separate module...
    
      \[data optional but not required for now\]
    
      -Price                              //this price put here employee 
    
      -First\_installment\_paid
      -Date\_of\_1\_installment\_paid         //date when client has paid first installment
      -Document1\_type                    //type of first document paid: to choose is: (invoice "faktura" or paragon "paragon" or KP "KP") 
      -Document1\_number                  //this document number put employee when he know this number
    
      -Second\_installment\_paid
      -Date\_of\_2\_installment\_paid        //date when client has paid second installment
      -Document2\_type                   //type of second document paid: to choose is: (invoice "faktura" or paragon "paragon" or KP "KP"))
      -Document2\_number                 //this document number put employee when he know this number
    
      -Third\_installment\_paid
      -Date\_of\_3\_installment\_paid       //date when client has paid third installmen
      -Document3\_type                   //type of third document paid: to choose is: (invoice "faktura" or paragon "paragon" or KP "KP")
      -Document3\_number                //this document number put employee when he know this number  
    

    next will be the PAYMENT MODULE:

    //COMMENT:
    //employee could/can put this datas in this module (of payment) in module registration when he register client, but he can do it later when for example employee/receptionist will know //about number of type of document, number of document etc.. later and then he put.. i hope u understand what i mean - so this module is for easy job and it has controls only for pay but //same as above...
    //So we will have 1 general schedule with all data of all types of resi

    MySQL csharp database mysql help tutorial
  • Login

  • Don't have an account? Register

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