Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
(When i will click add button Open another division)

and After When i will click Save button Data is saving Sucessfully in Database ,

After Save button is disabled and Enabled Edit and Update and duplicate buttons

When i will click Duplicate button Save record is taken in duplicate ...Next

In Duplicate Button Edit and save options .. NExt I will edit the database ...When I click save button ... Save Another Record( No Update)
Posted
Updated 4-Mar-14 18:14pm
v3
Comments
[no name] 5-Mar-14 0:01am    
And when i click one Duplicate button.. then ?
Sai Prasad anumolu 5-Mar-14 0:03am    
when I click on Duplicate ..Save Record data is comming, In duplicate button Edit And Save button ... When i click on Save button Save ...Another Record
[no name] 5-Mar-14 0:09am    
Please update your question with more descriptive. Thanks!
dan!sh 5-Mar-14 0:05am    
Please try to be as descriptive as you can with the question.

1 solution

You should Write query like this...
When you click on Duplicate button,then it's automatically saved Oreginal Table and
Changing values will be changed in another Table..

SQL
insert TableBKP
           select * from Table where sno = @keys

           update Table set [date] = @date,reason = @reason,updatedby=@updatedby where sno=@keys
 
Share this answer
 
v2
Comments
Sai Prasad anumolu 5-Mar-14 0:17am    
Kk Anna I will try and Present I am using controls (File Upload and text box) i will send U Datatable


Create table Tbl_TextAdds(AddId int Identity(1,1),ImagePath nvarchar(max),MaxCharLength varchar(200),Price Money default 1)
Siva Hyderabad 5-Mar-14 0:20am    
@prasad , if you click on duplicate button..then it shows oreginal Database Data..
Now You click on Edit button..Then it's edited Data..Fine..Now Update button is Enable..Yes,
Now You click on Update button Then Updated Data Changed The Original Table with Updation and Changing original Row Data in Another TableBKP.
Sai Prasad anumolu 5-Mar-14 0:26am    
Now You click on Edit button..Then it's edited Data..Fine..Now ,Save Button is there Both dupicate and Original ,after save button - Update button is Enable..Yes, another record is saving in database .. How it is possible anna
Sai Prasad anumolu 5-Mar-14 0:20am    
Create table Tbl_TextAdds(AddId int Identity(1,1),ImagePath nvarchar(max),MaxCharLength varchar(200),Price Money default 1)
Siva Hyderabad 5-Mar-14 0:29am    
insert Tbl_TextAddsBKP
select * from Tbl_TextAdds where sno = @sno

update Table set ImagePath = @ImagePath ,Price = @Price where sno=@sno

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900