1
Answer

How to get the Infragistics controls in webform page

How to get the all Infragistics controls in webform in web application. I have to do 2 task.
 
1) Create a project to Show data retrieved from XML using Infragistics Grid control with Sort/Filters enabled.

1.

2)  Create a project to Show data in Infragistcs Tree View control retrieved from XML.                

1

 
Answers (1)
1
Tapan Patel

Tapan Patel

NA 8.1k 100.8k 7y
I would suggest to let it be handled by server itself.
Use Time as the datatype of column.
Try this code. 
 
  1. CREATE TABLE #tempX(data TIME)  
  2. DECLARE @somedate DATETIME = GETDATE();  
  3. INSERT INTO #tempX  
  4.         ( data )  
  5. VALUES  ( @somedate  
  6.           )  
  7. SELECT * FROM #tempX  
  8. DROP TABLE #tempX  
 
1
Ayan Roy

Ayan Roy

NA 376 263 7y
You can change the date format using C# as well as SQL .
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
DateTime dt = DateTime.Now;
string time = dt.ToString("hh:mm:ss tt");
Console.WriteLine(time);
}
}
}
 
and if you want to get the time from SQL server Then You can use the Date function .
 SELECT CONVERT(VARCHAR(8),GETDATE(),108) AS HourMinute .
 I think this will help you :). 
0
Rafnas T P

Rafnas T P

NA 12.2k 435.4k 7y
in sql you can use datatype as time
and in front end you can use any time control like datetime picker
0
Nilesh Shah

Nilesh Shah

NA 22.3k 214.6k 7y

Attachment Time.zip

create test table:
  1. CREATE TABLE [dbo].[TimeOnlyTest](  
  2.     [Id] [int] IDENTITY(1,1) NOT NULL,  
  3.     [TimeOnly] [time](7) NOT NULL,  
  4.  CONSTRAINT [PK_TimeOnlyTest] PRIMARY KEY CLUSTERED   
  5. (  
  6.     [Id] ASC  
  7. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ONON [PRIMARY]  
  8. ON [PRIMARY]  
  9.   
  10. GO 
 create SP:
  1. CREATE PROCEDURE [dbo].[SP_TimeOnlyTest]  
  2.     @timeonly nvarchar(8)     
  3. AS  
  4. BEGIN  
  5.     insert into TimeOnlyTest(TimeOnly) values (CONVERT(TIME, @timeonly))  
  6. END  
  7.   
  8. GO 
 call from C# code:
  1. SqlConnection con = new SqlConnection("Data Source=localhost;initial catalog= LocalTest;Integrated Security=True;");  
  2.             con.Open();  
  3.   
  4.             SqlCommand command = new SqlCommand("SP_TimeOnlyTest", con);  
  5.             command.CommandType = CommandType.StoredProcedure;  
  6.             command.Parameters.Add(new SqlParameter("@timeonly", SqlDbType.NVarChar, 0, "timeonly"));  
  7.   
  8.             DateTime thisTime = DateTime.Now;  
  9.             command.Parameters[0].Value = thisTime.Hour.ToString() + ":" + thisTime.Minute.ToString() + ":" + thisTime.Second.ToString();  
  10.   
  11.             int i = command.ExecuteNonQuery();  
  12.             con.Close(); 
 
0
Amit Gupta

Amit Gupta

NA 16.5k 25.5k 7y
Yes, you can..Read the reference for more information
0
siva nathan

siva nathan

NA 309 21.3k 7y
im using sql server2012,
how to achieve that task 
0
Amit Gupta

Amit Gupta

NA 16.5k 25.5k 7y
If you are using SQL 2008 or newer, you can use TIME Datatype to store only time
 
Reference
https://msdn.microsoft.com/en-us/library/bb677243.aspx