Search

You searched for the word(s): userid:699298

Matching Posts

  • Re: Colum values depending in another column

    It's finally working... this is the code: 1 Public Class Test 2 Private myConnStr As String = "data source=(local); integrated security=SSPI; initial catalog=CMI" 3 4 Public Function MakeDataTable( ByVal doc As Integer , ByVal thisDate As Date ) As DataTable 5 ' Using 6 Dim connection As SqlConnection = New SqlConnection(myConnStr) 7 Try 8 Dim Query As String = "SELECT horainicio FROM [Modulo] WHERE idespecialidadmedico=@doc and iddia=@iddia" 9 Dim command As SqlCommand = New SqlCommand(Query, connection
    Posted to Data Presentation Controls (Forum) by Saintcorp on 12/27/2006
  • Re: Colum values depending in another column

    I made the changes, but I think I've found the error. It was in the query :) Since the SQL server uses only datetime types, one have to split the component of it So, this query: SELECT * FROM [RESERVA] WHERE idespecialidadmedico=1 AND fechareserva=@Date AND hireserva=@Hour Becomes: SELECT * FROM [RESERVA] WHERE idespecialidadmedico=1 AND fechareserva=@Date AND hireserva - CAST (FLOOR( CAST (hireserva AS float )) AS datetime ) =@Hour Now it works.... but I'm not done yet ;) Thanks a lot!!!!!!
    Posted to Data Presentation Controls (Forum) by Saintcorp on 12/26/2006
  • Re: Colum values depending in another column

    1 Public Class Test 2 Private myConnStr As String = "data source=(local); integrated security=SSPI; initial catalog=CMI" 3 4 Public Function MakeDataTable( ByVal doc As Integer , ByVal thisDate As DateTime) As DataTable 5 ' Using 6 Dim connection As SqlConnection = New SqlConnection(myConnStr) 7 Try 8 Dim Query As String = "SELECT horainicio FROM [Modulo] WHERE idespecialidadmedico=@doc and iddia=@iddia" 9 Dim command As SqlCommand = New SqlCommand(Query, connection) 10 command.CommandType = CommandType
    Posted to Data Presentation Controls (Forum) by Saintcorp on 12/26/2006
  • Re: Colum values depending in another column

    Forget about the 20 and 22 line :P
    Posted to Data Presentation Controls (Forum) by Saintcorp on 12/26/2006
  • Re: Colum values depending in another column

    1 Public Class Test 2 Private myConnStr As String = "data source=(local); integrated security=SSPI; initial catalog=CMI" 3 4 Public Function MakeDataTable( ByVal doc As Integer , ByVal thisDate As String ) As DataTable 5 ' Using 6 Dim connection As SqlConnection = New SqlConnection(myConnStr) 7 Try 8 Dim Query As String = "SELECT horainicio FROM [Modulo] WHERE idespecialidadmedico=@doc" 9 Dim command As SqlCommand = New SqlCommand(Query, connection) 10 command.CommandType = CommandType.Text 11 command
    Posted to Data Presentation Controls (Forum) by Saintcorp on 12/26/2006
  • Re: Colum values depending in another column

    I was looking up the code and I get an error on if (IsReserved(doc, reader["Hour"].ToString(), thisDate)) { dt.Rows.Add(new Object[] { reader["Hour"].ToString(), "Reserved" }); It says something about "Make sure that the maximum index on a list is less than the list size".
    Posted to Data Presentation Controls (Forum) by Saintcorp on 12/25/2006
  • Re: Colum values depending in another column

    I appreciate your help very much, but I still can't see a solution :( Let's see.... I have two tables: Modules and Reservation In MODULE I have every module from a doctor with the day and the hours that he goes to work, for example: doctor | module | hour | day -------------------------------------------- 1 1 10:00 1 1 2 10:30 1 1 3 11:00 1 1 4 09:00 2 1 5 09:30 2 This says that the Doctor 1 works from 10:00 until 11:00 on Monday, from 9 to 9:30 on Tuesday And in RESERVATION I got: date | hour |
    Posted to Data Presentation Controls (Forum) by Saintcorp on 12/24/2006
  • Colum values depending in another column

    I'm doing a little reservation grid and I need two columns In the first one I got the hours and in the second one I got the 'state' For example: HOUR | STATE ------------------------- 10:00 | Available 10:30 | Reserved 11:00 | Reserved 11:30 | Available The problem is that I fill this gridview from differents tables in my BD. So, the only way I can make this is binding the state items while the gridview is being generated, do I explain myself? But, I don't know how to do this :S In this tutorial
    Posted to Data Presentation Controls (Forum) by Saintcorp on 12/23/2006
    Filed under: gridview custom column data items
Page 1 of 1 (8 items)