ASP.NET Class

 

.NET Insert and View 

1.get  clone

2.add sql queries 

3.Run the project

https://github.com/vasanth32/ASP_NET_INSERT_VIEW


CREATE TABLE [dbo].[Student2](

[id] [int] IDENTITY(1,1) NOT NULL,

[Fname] [nchar](10) NOT NULL,

[MName] [nchar](10) NULL,

[Lastname] [nchar](10) NULL,

 CONSTRAINT [PK_Student2] PRIMARY KEY CLUSTERED 

(

[id] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

----------


Create procedure  TestProcedure    

(    

@Action varchar (10),    

@fname Varchar (50),    

@Mname varchar (50),    

@Lname Varchar (50)    

)    

as    

begin   



If @Action='Insert'   --used to insert records    

Begin    


Insert into Student2 (Fname,MName,Lastname) values (@fname,@Mname,@Lname)    

End    


else if @Action='View'   --used to view records    

Begin    


select *from Student2 


End    

End 

----------------------

Asp_Repeater_basic_controls


https://github.com/vasanth32/asp_Repeater_basic_controls


CREATE TABLE [dbo].[RegistrationsTable](

[FirstName] [nchar](20) NULL,

[LastName] [nchar](10) NULL,

[Email] [nchar](30) NULL,

[MobileNumber] [bigint] NULL,

[Password] [nchar](30) NULL

) ON [PRIMARY]

GO

-----------

CREATE TABLE [dbo].[Bonus](

[WORKER_REF_ID] [int] NULL,

[BONUS_AMOUNT] [int] NULL,

[BONUS_DATE] [datetime] NULL

) ON [PRIMARY]

GO


ALTER TABLE [dbo].[Bonus]  WITH CHECK ADD FOREIGN KEY([WORKER_REF_ID])

REFERENCES [dbo].[Worker] ([WORKER_ID])

ON DELETE CASCADE

GO

--------------------

CREATE TABLE [dbo].[Title](

[WORKER_REF_ID] [int] NULL,

[WORKER_TITLE] [char](25) NULL,

[AFFECTED_FROM] [datetime] NULL

) ON [PRIMARY]

GO


ALTER TABLE [dbo].[Title]  WITH CHECK ADD FOREIGN KEY([WORKER_REF_ID])

REFERENCES [dbo].[Worker] ([WORKER_ID])

ON DELETE CASCADE

GO

----------------

CREATE TABLE [dbo].[Worker](

[WORKER_ID] [int] IDENTITY(1,1) NOT NULL,

[FIRST_NAME] [char](25) NULL,

[LAST_NAME] [char](25) NULL,

[SALARY] [int] NULL,

[JOINING_DATE] [datetime] NULL,

[DEPARTMENT] [char](25) NULL,

PRIMARY KEY CLUSTERED 

(

[WORKER_ID] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

------------------


Comments

Popular Posts